mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier0: fix bug in CIOStream::Pad()
We must always use the remainder when writing out padding. The bug was that it would still do the full count or PAD_BUF_SIZE at all times even though the remainder is 20 for example. This fixes the last few rare alignment problems.
This commit is contained in:
parent
c8ee0d4333
commit
e63660b549
@ -293,7 +293,7 @@ void CIOStream::Pad(const size_t count)
|
||||
|
||||
while (remainder)
|
||||
{
|
||||
const size_t writeCount = (std::min)(count, PAD_BUF_SIZE);
|
||||
const size_t writeCount = (std::min)(remainder, PAD_BUF_SIZE);
|
||||
Write(s_padBuf, writeCount);
|
||||
|
||||
remainder -= writeCount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user