Skip to content

Commit

Permalink
libs/libc: Fix a fatal bug in fread
Browse files Browse the repository at this point in the history
Fix a bug the destination buffer is not updated.
It is caused by the following commit.
commit 5d8d5bf
  • Loading branch information
SPRESENSE authored and pussuw committed Sep 13, 2023
1 parent 14b9bb1 commit fc8dd5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/libc/stdio/lib_libfread.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ ssize_t lib_fread(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
Expand Down

0 comments on commit fc8dd5e

Please sign in to comment.