mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed crash on parsing bad hex number
https://forum.zdoom.org/viewtopic.php?t=65718
This commit is contained in:
parent
574e079f17
commit
cc1f18a328
1 changed files with 2 additions and 1 deletions
|
@ -1283,7 +1283,8 @@ int ParseHex(const char* hex, FScriptPosition* sc)
|
|||
else if (*str >= 'A' && *str <= 'F')
|
||||
num += 10 + *str - 'A';
|
||||
else {
|
||||
sc->Message(MSG_WARNING, "Bad hex number: %s", hex);
|
||||
if (sc) sc->Message(MSG_WARNING, "Bad hex number: %s", hex);
|
||||
else Printf("Bad hex number: %s\n", hex);
|
||||
return 0;
|
||||
}
|
||||
str++;
|
||||
|
|
Loading…
Reference in a new issue