We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fa4ffe commit 8291e41Copy full SHA for 8291e41
Core/SaveState.cpp
@@ -281,7 +281,11 @@ namespace SaveState
281
if (blockSize > 0) {
282
result.insert(result.end(), compressed.begin() + i, compressed.begin() + i + blockSize);
283
i += blockSize;
284
- basePos += blockSize;
+ // This check is to avoid advancing basePos out of range, which MSVC catches.
285
+ // When this happens, we're at the end of decoding anyway.
286
+ if (base.end() - basePos >= blockSize) {
287
+ basePos += blockSize;
288
+ }
289
}
290
291
0 commit comments