Commit 30e248ff authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

Allow reading 0 bytes in fread.

parent 2d7e976e
......@@ -2482,6 +2482,9 @@ MSVCRT_size_t MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, M
MSVCRT_size_t read=0;
int pread=0;
if(!rcnt)
return 0;
/* first buffered data */
if(file->_cnt>0) {
int pcnt= (rcnt>file->_cnt)? file->_cnt:rcnt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment