fix an error in wifi savestates; add sanity checking for chunk identifier to savestate code to keep this mistake from happening again
This commit is contained in:
parent
27ce7acf63
commit
131603c25b
|
@ -354,12 +354,12 @@ SFORMAT SF_WIFI[]={
|
|||
{ "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 @@ static int SubWrite(std::ostream* os, const SFORMAT *sf)
|
|||
{
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue