diff options
Diffstat (limited to 'src/stdio/fread.c')
-rw-r--r-- | src/stdio/fread.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdio/fread.c b/src/stdio/fread.c index 33a65f58..aef75f73 100644 --- a/src/stdio/fread.c +++ b/src/stdio/fread.c @@ -7,6 +7,7 @@ size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) { unsigned char *dest = destv; size_t len = size*nmemb, l = len, k; + if (!size) nmemb = 0; FLOCK(f); |