From: notaz Date: Sat, 29 Sep 2012 19:10:28 +0000 (+0300) Subject: fix state corruption X-Git-Tag: r2~8 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=commitdiff_plain;h=ed531dd606f7ea4558517576afee38253450d1c3 fix state corruption --- diff --git a/state.c b/state.c index deacbbf..ab2f0c9 100644 --- a/state.c +++ b/state.c @@ -289,9 +289,9 @@ void SaveState(void) if(st!=NULL) { - static uint32 totalsize; - static uint8 header[16]="FCS"; - memset(header+4,0,13); + uint32 totalsize; + uint8 header[16]="FCS"; + memset(header+4,0,sizeof(header)-4); header[3]=VERSION_NUMERIC; fwrite(header,1,16,st);