mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-08 06:48:56 -04:00
Fix infinite loop
This commit is contained in:
parent
d29b7528a6
commit
595da1e61e
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user