From eb15768095331b2b06b36c2d8210d9935fcd4f3e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 10 Oct 2020 20:31:54 +0200 Subject: [PATCH] enable double quotes also in special case of leading \ --- src/frontend/parser/lexical.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/parser/lexical.c b/src/frontend/parser/lexical.c index 370ce1447..77b84f569 100644 --- a/src/frontend/parser/lexical.c +++ b/src/frontend/parser/lexical.c @@ -269,8 +269,7 @@ nloop: break; /* if " or `, read until next " or ` is hit, will form a new word, - including the quotes. - In case of \, the next character gets the eights bit set. */ + including the quotes. */ case '"': case '`': d = c; @@ -282,6 +281,9 @@ nloop: if (c == '\\') { push(&linebuf, c); c = cp_readchar(&string, cp_inp_cur); + /* found our end char already here, so leave while loop */ + if (c == d) + break; push(&buf, c); push(&linebuf, c); } else {