From ed531dd606f7ea4558517576afee38253450d1c3 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 29 Sep 2012 22:10:28 +0300 Subject: [PATCH] fix state corruption --- state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5