From cc1f18a3286b2c11bb475a8a44277d308f8c6bcc Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 25 Aug 2019 11:21:44 +0300 Subject: [PATCH] - fixed crash on parsing bad hex number https://forum.zdoom.org/viewtopic.php?t=65718 --- src/utility/sc_man.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utility/sc_man.cpp b/src/utility/sc_man.cpp index 35b45e998..562d85448 100644 --- a/src/utility/sc_man.cpp +++ b/src/utility/sc_man.cpp @@ -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++;