Skip to content

Commit

Permalink
netplay: Fix warnings and crash with >5 clients.
Browse files Browse the repository at this point in the history
  • Loading branch information
bearoso committed Apr 30, 2023
1 parent cbc14ee commit 6c60368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -1031,7 +1031,7 @@ void S9xNPSyncClient (int client)
S9xNPRecomputePause ();
S9xNPSendFreezeFile (client, data, len);
}
delete data;
delete[] data;
}
remove (fname);
}
Expand Down Expand Up @@ -1208,7 +1208,7 @@ void S9xNPSendFreezeFileToAllClients (const char *filename)
if (NPServer.Clients [c].SaidHello)
S9xNPSendFreezeFile (c, data, len);
}
delete data;
delete[] data;
}
}

Expand Down

0 comments on commit 6c60368

Please sign in to comment.