* commit '94a4a173d24ce8feac5c49fb5ad209a836d41439': Fix optimized fread.
This commit is contained in:
@@ -120,7 +120,7 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
|
||||
while (total > 0) {
|
||||
ssize_t bytes_read = (*fp->_read)(fp->_cookie, dst, total);
|
||||
if (bytes_read <= 0) {
|
||||
fp->_flags = (fp->_r == 0) ? __SEOF : __SERR;
|
||||
fp->_flags |= (bytes_read == 0) ? __SEOF : __SERR;
|
||||
break;
|
||||
}
|
||||
dst += bytes_read;
|
||||
|
||||
Reference in New Issue
Block a user