Fix infinite loop

This commit is contained in:
Dmitry Marakasov 2015-09-17 15:30:46 +03:00
parent d29b7528a6
commit 595da1e61e

View File

@ -93,8 +93,10 @@ private:
size_t count = nread % size; size_t count = nread % size;
// put partially read object back into the stream // put partially read object back into the stream
while (--count >= 0) while (count != 0) {
stream_.putback(*--pos); stream_.putback(*--pos);
--count;
}
} }
return nread / size; return nread / size;