Chromium Code Reviews| Index: fusl/src/stdio/fread.c |
| diff --git a/fusl/src/stdio/fread.c b/fusl/src/stdio/fread.c |
| index 33a65f586ead4649ef537ce53780ea7e12fd0e8e..aef75f7376f700dd584bf346ab1b7b17717ab097 100644 |
| --- a/fusl/src/stdio/fread.c |
| +++ b/fusl/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); |