From 423fe600801873fb85eddd920577589b94475e17 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 11 Dec 2020 11:22:07 +0100 Subject: [PATCH] - fixed: strbin did not check for a terminating 0-character right after an escaping backslash. --- src/common/utility/cmdlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/utility/cmdlib.cpp b/src/common/utility/cmdlib.cpp index dac58292a..8786a1c70 100644 --- a/src/common/utility/cmdlib.cpp +++ b/src/common/utility/cmdlib.cpp @@ -590,7 +590,7 @@ int strbin (char *str) while ( (c = *p++) ) { if (c != '\\') { *str++ = c; - } else { + } else if (*p != 0) { switch (*p) { case 'a': *str++ = '\a'; @@ -693,7 +693,7 @@ FString strbin1 (const char *start) while ( (c = *p++) ) { if (c != '\\') { result << c; - } else { + } else if (*p) { switch (*p) { case 'a': result << '\a';