aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Parser/string_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/string_parser.c')
-rw-r--r--Parser/string_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/string_parser.c b/Parser/string_parser.c
index 9b557e94d00..d3631b114c5 100644
--- a/Parser/string_parser.c
+++ b/Parser/string_parser.c
@@ -19,7 +19,8 @@ warn_invalid_escape_sequence(Parser *p, const char* buffer, const char *first_in
return 0;
}
unsigned char c = (unsigned char)*first_invalid_escape;
- if ((t->type == FSTRING_MIDDLE || t->type == FSTRING_END) && (c == '{' || c == '}')) {
+ if ((t->type == FSTRING_MIDDLE || t->type == FSTRING_END || t->type == TSTRING_MIDDLE || t->type == TSTRING_END)
+ && (c == '{' || c == '}')) {
// in this case the tokenizer has already emitted a warning,
// see Parser/tokenizer/helpers.c:warn_invalid_escape_sequence
return 0;