mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 07:32:02 +00:00
Fix map number checks when reading unlockable conditions.
This commit is contained in:
parent
c65851d17c
commit
508536e3d7
1 changed files with 3 additions and 3 deletions
|
@ -3307,7 +3307,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
||||||
else
|
else
|
||||||
re = atoi(params[1]);
|
re = atoi(params[1]);
|
||||||
|
|
||||||
if (re < 0 || re >= NUMMAPS)
|
if (re <= 0 || re > NUMMAPS)
|
||||||
{
|
{
|
||||||
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
||||||
return;
|
return;
|
||||||
|
@ -3327,7 +3327,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
||||||
else
|
else
|
||||||
x1 = (INT16)atoi(params[1]);
|
x1 = (INT16)atoi(params[1]);
|
||||||
|
|
||||||
if (x1 < 0 || x1 >= NUMMAPS)
|
if (x1 <= 0 || x1 > NUMMAPS)
|
||||||
{
|
{
|
||||||
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
||||||
return;
|
return;
|
||||||
|
@ -3362,7 +3362,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
||||||
else
|
else
|
||||||
x1 = (INT16)atoi(params[1]);
|
x1 = (INT16)atoi(params[1]);
|
||||||
|
|
||||||
if (x1 < 0 || x1 >= NUMMAPS)
|
if (x1 <= 0 || x1 > NUMMAPS)
|
||||||
{
|
{
|
||||||
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue