aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index eb3a250120..907f0c2de2 100644
--- a/parse.y
+++ b/parse.y
@@ -5140,7 +5140,7 @@ parser_read_escape(struct parser_params *parser, int flags,
*has8bit = 1;
return read_escape(flags|ESCAPE_META, &tmp, &tmp, encp) | 0x80;
}
- else if (c == -1) goto eof;
+ else if (c == -1 || !ISASCII(c)) goto eof;
else {
*has8bit = 1;
return ((c & 0xff) | 0x80);
@@ -5159,7 +5159,7 @@ parser_read_escape(struct parser_params *parser, int flags,
}
else if (c == '?')
return 0177;
- else if (c == -1) goto eof;
+ else if (c == -1 || !ISASCII(c)) goto eof;
return c & 0x9f;
eof: