Skip to content

Commit d996c2e

Browse files
ajuckleracassis
authored andcommitted
mtd/at25ee.c: Fix write check condition
Fix writing till the very last byte of the memory Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
1 parent 23de88e commit d996c2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/at25ee.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ static ssize_t at25ee_write(FAR struct mtd_dev_s *dev, off_t offset,
667667

668668
/* Forbid writes past the end of the device */
669669

670-
if (nbytes + offset >= priv->size)
670+
if (nbytes + offset > priv->size)
671671
{
672672
return 0;
673673
}

0 commit comments

Comments
 (0)