mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-07 11:51:20 +00:00
Use READ/WRITEMEM instead of STRINGN for data that can contain 0s, dummy!
This commit is contained in:
parent
6510628586
commit
bf4781d26c
3 changed files with 7 additions and 7 deletions
|
|
@ -280,7 +280,7 @@ shouldsign_t ShouldSignChallenge(uint8_t *message)
|
|||
#ifndef SRB2_LITTLE_ENDIAN
|
||||
#error "FIXME: 64-bit timestamp field is not supported on Big Endian"
|
||||
#endif
|
||||
|
||||
|
||||
UINT64 then, now;
|
||||
UINT32 claimedIP, realIP;
|
||||
|
||||
|
|
@ -3833,7 +3833,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
|||
newplayer->jointime = 0;
|
||||
|
||||
READSTRINGN(*p, player_names[newplayernum], MAXPLAYERNAME);
|
||||
READSTRINGN(*p, players[newplayernum].public_key, 32);
|
||||
READMEM(*p, players[newplayernum].public_key, 32);
|
||||
|
||||
console = READUINT8(*p);
|
||||
splitscreenplayer = READUINT8(*p);
|
||||
|
|
|
|||
|
|
@ -255,8 +255,8 @@ void PR_SaveProfiles(void)
|
|||
{
|
||||
// Names and keys, all the string data up front
|
||||
WRITESTRINGN(save.p, profilesList[i]->profilename, PROFILENAMELEN);
|
||||
WRITESTRINGN(save.p, profilesList[i]->public_key, sizeof(((profile_t *)0)->public_key));
|
||||
WRITESTRINGN(save.p, profilesList[i]->secret_key, sizeof(((profile_t *)0)->secret_key));
|
||||
WRITEMEM(save.p, profilesList[i]->public_key, sizeof(((profile_t *)0)->public_key));
|
||||
WRITEMEM(save.p, profilesList[i]->secret_key, sizeof(((profile_t *)0)->secret_key));
|
||||
WRITESTRINGN(save.p, profilesList[i]->playername, MAXPLAYERNAME);
|
||||
|
||||
// Character and colour.
|
||||
|
|
@ -348,8 +348,8 @@ void PR_LoadProfiles(void)
|
|||
|
||||
// Names and keys, all the identity stuff up front
|
||||
READSTRINGN(save.p, profilesList[i]->profilename, PROFILENAMELEN);
|
||||
READSTRINGN(save.p, profilesList[i]->public_key, sizeof(((profile_t *)0)->public_key));
|
||||
READSTRINGN(save.p, profilesList[i]->secret_key, sizeof(((profile_t *)0)->secret_key));
|
||||
READMEM(save.p, profilesList[i]->public_key, sizeof(((profile_t *)0)->public_key));
|
||||
READMEM(save.p, profilesList[i]->secret_key, sizeof(((profile_t *)0)->secret_key));
|
||||
READSTRINGN(save.p, profilesList[i]->playername, MAXPLAYERNAME);
|
||||
|
||||
// Character and colour.
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
WRITEUINT8(save->p, players[i].sliptideZipDelay);
|
||||
WRITEUINT16(save->p, players[i].sliptideZipBoost);
|
||||
|
||||
WRITESTRINGN(save->p, players[i].public_key, 32);
|
||||
WRITEMEM(save->p, players[i].public_key, 32);
|
||||
|
||||
// respawnvars_t
|
||||
WRITEUINT8(save->p, players[i].respawn.state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue