diff options
Diffstat (limited to 'src/streams.h')
-rw-r--r-- | src/streams.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/streams.h b/src/streams.h index b508784238..05facad709 100644 --- a/src/streams.h +++ b/src/streams.h @@ -586,11 +586,11 @@ protected: readNow = nAvail; if (readNow == 0) return false; - size_t read = fread((void*)&vchBuf[pos], 1, readNow, src); - if (read == 0) { + size_t nBytes = fread((void*)&vchBuf[pos], 1, readNow, src); + if (nBytes == 0) { throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill: end of file" : "CBufferedFile::Fill: fread failed"); } else { - nSrcPos += read; + nSrcPos += nBytes; return true; } } |