From 00278fa9053d768a305e18098f10737eece443f0 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 23 Dec 2024 23:53:24 +1000 Subject: [PATCH] PIO: Fix failure to load state with different cart type --- src/core/pio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/pio.cpp b/src/core/pio.cpp index 06608717e..ccc9c5cd0 100644 --- a/src/core/pio.cpp +++ b/src/core/pio.cpp @@ -856,7 +856,7 @@ bool PIO::DoState(StateWrapper& sw) WARNING_LOG("State contains PIO device {}, expected {}", Settings::GetPIODeviceTypeModeName(device_type), Settings::GetPIODeviceTypeModeName(g_settings.pio_device_type)); g_pio_device->Reset(); - sw.SkipBytes(pio_state_size); + sw.SkipBytes(pio_state_size - sizeof(pio_state_size)); } return !sw.HasError();