From: <ze...@us...> - 2009-07-31 21:47:05
|
Revision: 2699 http://desmume.svn.sourceforge.net/desmume/?rev=2699&view=rev Author: zeromus Date: 2009-07-31 21:46:21 +0000 (Fri, 31 Jul 2009) Log Message: ----------- fix an error in wifi savestates; add sanity checking for chunk identifier to savestate code to keep this mistake from happening again Modified Paths: -------------- trunk/desmume/src/saves.cpp Modified: trunk/desmume/src/saves.cpp =================================================================== --- trunk/desmume/src/saves.cpp 2009-07-31 17:04:02 UTC (rev 2698) +++ trunk/desmume/src/saves.cpp 2009-07-31 21:46:21 UTC (rev 2699) @@ -354,12 +354,12 @@ { "W530", 2, 1, &wifiMac.CircBufWrEnd}, { "W540", 2, 1, &wifiMac.CircBufWrSkip}, - { "W540", 4, 1, &wifiMac.curPacketSize[0]}, - { "W550", 4, 1, &wifiMac.curPacketPos[0]}, - { "W560", 4, 1, &wifiMac.curPacketSending[0]}, + { "W550", 4, 1, &wifiMac.curPacketSize[0]}, + { "W560", 4, 1, &wifiMac.curPacketPos[0]}, + { "W570", 4, 1, &wifiMac.curPacketSending[0]}, - { "W570", 2, 0x800, &wifiMac.ioMem[0]}, - { "W580", 2, 1, &wifiMac.randomSeed}, + { "W580", 2, 0x800, &wifiMac.ioMem[0]}, + { "W590", 2, 1, &wifiMac.randomSeed}, { "WX00", 8, 1, &wifiMac.SoftAP.usecCounter}, { "WX10", 1, 4096, &wifiMac.SoftAP.curPacket[0]}, @@ -760,6 +760,18 @@ { uint32 acc=0; + const SFORMAT* temp = sf; + while(temp->v) { + const SFORMAT* seek = sf; + while(seek->v && seek != temp) { + if(!strcmp(seek->desc,temp->desc)) { + printf("ERROR! duplicated chunk name: %s\n", temp->desc); + } + seek++; + } + temp++; + } + while(sf->v) { //not supported right now This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |