mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
M_GetConditionString, UC_EMBLEM: Prevent Medal ID out-of-bounds
This commit is contained in:
parent
7e484150bd
commit
405c6cb3e2
1 changed files with 4 additions and 2 deletions
|
|
@ -2442,10 +2442,12 @@ static const char *M_GetConditionString(condition_t *cn)
|
|||
|
||||
case UC_EMBLEM: // Requires emblem x to be obtained
|
||||
{
|
||||
INT32 checkLevel;
|
||||
INT32 checkLevel = NEXTMAP_INVALID;
|
||||
|
||||
i = cn->requirement-1;
|
||||
checkLevel = M_EmblemMapNum(&emblemlocations[i]);
|
||||
|
||||
if (i >= 0 && i < numemblems)
|
||||
checkLevel = M_EmblemMapNum(&emblemlocations[i]);
|
||||
|
||||
if (checkLevel >= nummapheaders || !mapheaderinfo[checkLevel] || emblemlocations[i].type == ET_NONE)
|
||||
return va("INVALID MEDAL MAP \"%d:%d\"", cn->requirement, checkLevel);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue