From 1b67418a1f75082f349223299657d9d98419220a 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/cmdlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index 7d8ba90f7..66a36ebff 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -609,7 +609,7 @@ int strbin (char *str) while ( (c = *p++) ) { if (c != '\\') { *str++ = c; - } else { + } else if (*p != 0) { switch (*p) { case 'a': *str++ = '\a'; @@ -712,7 +712,7 @@ FString strbin1 (const char *start) while ( (c = *p++) ) { if (c != '\\') { result << c; - } else { + } else if (*p) { switch (*p) { case 'a': result << '\a';