Core dump from "Missing right brace on \x{}"
[perl.git] / toke.c
diff --git a/toke.c b/toke.c
index 88933de..8664b8f 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1076,8 +1076,10 @@ scan_const(char *start)
                if (*s == '{') {
                    char* e = strchr(s, '}');
 
-                   if (!e)
+                   if (!e) {
                        yyerror("Missing right brace on \\x{}");
+                       e = s;
+                   }
                    if (!utf) {
                        dTHR;
                        if (ckWARN(WARN_UTF8))