mirror of https://github.com/mgba-emu/mgba.git
Core: Fix crash with rewind if savestates shrink
This commit is contained in:
parent
01832ec513
commit
84dc182a5d
1
CHANGES
1
CHANGES
|
@ -42,6 +42,7 @@ Bugfixes:
|
||||||
- GBA BIOS: Fix ArcTan2 sign in HLE BIOS (fixes mgba.io/i/689)
|
- GBA BIOS: Fix ArcTan2 sign in HLE BIOS (fixes mgba.io/i/689)
|
||||||
- GBA Video: Don't update background scanline params in mode 0 (fixes mgba.io/i/377)
|
- GBA Video: Don't update background scanline params in mode 0 (fixes mgba.io/i/377)
|
||||||
- Qt: Ensure CLI backend is attached when submitting commands (fixes mgba.io/i/662)
|
- Qt: Ensure CLI backend is attached when submitting commands (fixes mgba.io/i/662)
|
||||||
|
- Core: Fix crash with rewind if savestates shrink
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -50,6 +50,8 @@ void mCoreRewindAppend(struct mCoreRewindContext* context, struct mCore* core) {
|
||||||
if (size2 > size) {
|
if (size2 > size) {
|
||||||
context->currentState->truncate(context->currentState, size2);
|
context->currentState->truncate(context->currentState, size2);
|
||||||
size = size2;
|
size = size2;
|
||||||
|
} else if (size > size2) {
|
||||||
|
nextState->truncate(nextState, size);
|
||||||
}
|
}
|
||||||
void* current = context->currentState->map(context->currentState, size, MAP_READ);
|
void* current = context->currentState->map(context->currentState, size, MAP_READ);
|
||||||
void* next = nextState->map(nextState, size, MAP_READ);
|
void* next = nextState->map(nextState, size, MAP_READ);
|
||||||
|
|
Loading…
Reference in New Issue