mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
Fix writing till the very last byte of the memory Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
This commit is contained in:
committed by
Alan C. Assis
parent
23de88e70e
commit
d996c2e758
@@ -667,7 +667,7 @@ static ssize_t at25ee_write(FAR struct mtd_dev_s *dev, off_t offset,
|
||||
|
||||
/* Forbid writes past the end of the device */
|
||||
|
||||
if (nbytes + offset >= priv->size)
|
||||
if (nbytes + offset > priv->size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user