mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Fix infinite loop
This commit is contained in:
parent
d29b7528a6
commit
595da1e61e
@ -93,8 +93,10 @@ private:
|
||||
size_t count = nread % size;
|
||||
|
||||
// put partially read object back into the stream
|
||||
while (--count >= 0)
|
||||
while (count != 0) {
|
||||
stream_.putback(*--pos);
|
||||
--count;
|
||||
}
|
||||
}
|
||||
|
||||
return nread / size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user