mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix crash when pressing enter in Holly mode without typing anything (empty string buffer)
This commit is contained in:
parent
c2f30de350
commit
5acd37d3ee
1 changed files with 9 additions and 3 deletions
|
@ -1038,9 +1038,14 @@ void CheckKeys()
|
|||
{
|
||||
char *pToken = strtok(sHollyStr, " ");
|
||||
|
||||
// move player to X, Y coordinates
|
||||
if (!strcmp(pToken, "GOTO"))
|
||||
if (nStringLen == 0) // bjd - added this check. watcom allows passing NULL to strcmp so the below checks will all fail OK on DOS but will cause a crash on Windows
|
||||
{
|
||||
bHolly = kFalse;
|
||||
StatusMessage(1, " ");
|
||||
}
|
||||
else if (!strcmp(pToken, "GOTO"))
|
||||
{
|
||||
// move player to X, Y coordinates
|
||||
int nSprite = PlayerList[0].nSprite;
|
||||
|
||||
pToken = strtok(NULL, ",");
|
||||
|
@ -2423,8 +2428,9 @@ MENU2:
|
|||
CONTROL_ClearButton(gamefunc_Inventory);
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
SetAirFrame();
|
||||
}
|
||||
}
|
||||
if (record_mode == 3 && movefifopos == movefifoend) {
|
||||
levelnew = 0;
|
||||
|
|
Loading…
Reference in a new issue