mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
fs/smartfs: Fix a hardfault in SmartFS. Problem occurred when opening a file with O_CREAT (only) when the file arelready exists but has a size of zero.
This commit is contained in:
committed by
Gregory Nutt
parent
0686989645
commit
ee6264df4e
@@ -1823,7 +1823,7 @@ int smartfs_shrinkfile(FAR struct smartfs_mountpt_s *fs,
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
dest = (FAR uint8_t *)&sf->buffer;
|
||||
dest = (FAR uint8_t *)sf->buffer;
|
||||
destsize = fs->fs_llformat.availbytes;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user