mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
libs/libc: Fix a fatal bug in fread
Fix a bug the destination buffer is not updated.
It is caused by the following commit.
commit 5d8d5bfd73
This commit is contained in:
@@ -137,6 +137,7 @@ ssize_t lib_fread_unlocked(FAR void *ptr, size_t count, FAR FILE *stream)
|
||||
|
||||
remaining -= gulp_size;
|
||||
stream->fs_bufpos += gulp_size;
|
||||
dest += gulp_size;
|
||||
}
|
||||
|
||||
/* The buffer is empty OR we have already supplied the number
|
||||
|
||||
Reference in New Issue
Block a user