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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user