summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 236bcf71e..6c2f30c55 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -921,7 +921,16 @@ const char* parse_simpleexpr(const char *p)
p++;
while( *p && *p != '"' ){
if( (unsigned char)p[-1] <= 0x7e && *p == '\\' )
- p++;
+ {
+ char buf[8];
+ size_t len = skip_escaped_c(p) - p;
+ size_t n = sv_unescape_c(buf, p, len);
+ if( n != 1 )
+ ShowDebug("parse_simpleexpr: unexpected length %d after unescape (\"%.*s\" -> %.*s)\n", (int)n, (int)len, p, (int)n, buf);
+ p += len;
+ add_scriptb(*buf);
+ continue;
+ }
else if( *p == '\n' )
disp_error_message("parse_simpleexpr: unexpected newline @ string",p);
add_scriptb(*p++);