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:
Michał Łyszczek 2018-04-14 06:44:38 -06:00 committed by Gregory Nutt
parent 0686989645
commit ee6264df4e

View File

@ -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