From 2788222be32cc1686856540af08d5aba248c9b3d Mon Sep 17 00:00:00 2001 From: ayuanx Date: Thu, 31 Dec 2009 18:37:47 +0000 Subject: [PATCH] Fixed Issue 1888, marco.calautti's patch git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4761 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/State.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp index 7794ecfa93..703b726842 100644 --- a/Source/Core/Core/Src/State.cpp +++ b/Source/Core/Core/Src/State.cpp @@ -330,8 +330,8 @@ void LoadStateCallback(u64 userdata, int cyclesLate) else { fseek(f, 0, SEEK_END); - sz = (int)(ftell(f) - sizeof(int)); - fseek(f, sizeof(int), SEEK_SET); + sz = (int)(ftell(f) - sizeof(state_header)); + fseek(f, sizeof(state_header), SEEK_SET); buffer = new u8[sz]; int x; if ((x = (int)fread(buffer, 1, sz, f)) != (int)sz)