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 xiaoxiang781216 committed Sep 7, 2023
1 parent bfb0095 commit d4fbd7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/libc/stdio/lib_libfread_unlocked.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d4fbd7a

Please sign in to comment.