mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
D_SetupVote: Fix minor memory issues
memset takes UINT8-based arguments and cannot set UINT16_MAX
This commit is contained in:
parent
6578cf1b56
commit
5b4d771f28
1 changed files with 6 additions and 2 deletions
|
|
@ -2203,13 +2203,17 @@ void D_SetupVote(INT16 newgametype)
|
||||||
{
|
{
|
||||||
const UINT32 rules = gametypes[newgametype]->rules;
|
const UINT32 rules = gametypes[newgametype]->rules;
|
||||||
|
|
||||||
UINT8 buf[(VOTE_NUM_LEVELS * 2) + 4];
|
UINT8 buf[(VOTE_NUM_LEVELS * 2) + 2 + 1 + 1];
|
||||||
UINT8 *p = buf;
|
UINT8 *p = buf;
|
||||||
|
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
UINT16 votebuffer[VOTE_NUM_LEVELS + 1];
|
UINT16 votebuffer[VOTE_NUM_LEVELS + 1];
|
||||||
memset(votebuffer, UINT16_MAX, sizeof(votebuffer));
|
//memset(votebuffer, UINT16_MAX, sizeof(votebuffer));
|
||||||
|
for (i = 0; i < VOTE_NUM_LEVELS + 1; i++)
|
||||||
|
{
|
||||||
|
votebuffer[i] = UINT16_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
WRITEINT16(p, newgametype);
|
WRITEINT16(p, newgametype);
|
||||||
WRITEUINT8(p, ((cv_kartencore.value == 1) && (rules & GTR_ENCORE)));
|
WRITEUINT8(p, ((cv_kartencore.value == 1) && (rules & GTR_ENCORE)));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue