- fixed: strbin did not check for a terminating 0-character right after an escaping backslash.

This commit is contained in:
Christoph Oelckers 2020-12-11 11:22:07 +01:00 committed by drfrag
parent 028ce8e636
commit 1b67418a1f

View file

@ -609,7 +609,7 @@ int strbin (char *str)
while ( (c = *p++) ) { while ( (c = *p++) ) {
if (c != '\\') { if (c != '\\') {
*str++ = c; *str++ = c;
} else { } else if (*p != 0) {
switch (*p) { switch (*p) {
case 'a': case 'a':
*str++ = '\a'; *str++ = '\a';
@ -712,7 +712,7 @@ FString strbin1 (const char *start)
while ( (c = *p++) ) { while ( (c = *p++) ) {
if (c != '\\') { if (c != '\\') {
result << c; result << c;
} else { } else if (*p) {
switch (*p) { switch (*p) {
case 'a': case 'a':
result << '\a'; result << '\a';