mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 02:27:43 +00:00
Potential null-pointer dereference fix
This commit is contained in:
@@ -205,7 +205,11 @@ public:
|
||||
int width = HECL::ConsoleWidth();
|
||||
int half = width / 2 - 2;
|
||||
|
||||
if (!message)
|
||||
message = _S("");
|
||||
size_t messageLen = HECL::StrLen(message);
|
||||
if (!submessage)
|
||||
submessage = _S("");
|
||||
size_t submessageLen = HECL::StrLen(submessage);
|
||||
if (half - messageLen < submessageLen-2)
|
||||
submessageLen = 0;
|
||||
|
||||
Reference in New Issue
Block a user