mirror of
https://github.com/libretro/snes9x.git
synced 2024-11-26 18:10:26 +00:00
netplay: Fix warnings and crash with >5 clients.
This commit is contained in:
parent
cbc14ee0df
commit
6c60368fc4
@ -228,7 +228,7 @@ static bool8 S9xNPSSendData (int fd, const uint8 *data, int length)
|
||||
void S9xNPSendHeartBeat ()
|
||||
{
|
||||
int len = 3;
|
||||
uint8 data [3 + 4 * 5];
|
||||
uint8 data [(3 + 4) * 8];
|
||||
uint8 *ptr = data;
|
||||
int n;
|
||||
|
||||
@ -1031,7 +1031,7 @@ void S9xNPSyncClient (int client)
|
||||
S9xNPRecomputePause ();
|
||||
S9xNPSendFreezeFile (client, data, len);
|
||||
}
|
||||
delete data;
|
||||
delete[] data;
|
||||
}
|
||||
remove (fname);
|
||||
}
|
||||
@ -1208,7 +1208,7 @@ void S9xNPSendFreezeFileToAllClients (const char *filename)
|
||||
if (NPServer.Clients [c].SaidHello)
|
||||
S9xNPSendFreezeFile (c, data, len);
|
||||
}
|
||||
delete data;
|
||||
delete[] data;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user