Fixed Issue 1888, marco.calautti's patch

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4761 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx 2009-12-31 18:37:47 +00:00
parent ba25f038af
commit 2788222be3
1 changed files with 2 additions and 2 deletions

View File

@ -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)