mtd: nandsim: fix integer widening