summaryrefslogtreecommitdiff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
committerAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
commitbf8b7f713a5b04a191f4596fb86bbbfca0a855ce (patch)
treeb647a8dc990c8c845b8a8eca7bf92fbbf17e1fb5 /Src/lex.c
parent06946d431a4426c6e5dffec1d7edb17c1dbd467c (diff)
parent9dbde9e9c7d22ee0d301e4a2fecf97906d1ddce9 (diff)
downloadzsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.tar.gz
zsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.zip
New upstream release candidate 5.6.2-test-2
Merge branch 'upstream' at 'zsh-5.6.2-test-2' into branch debian
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 44ad88043..f43bcc7db 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1613,6 +1613,7 @@ parsestr(char **s)
zerr("parse error near `%c'", err);
else
zerr("parse error");
+ tok = LEXERR;
}
}
return err;
@@ -1626,7 +1627,7 @@ parsestrnoerr(char **s)
zcontext_save();
untokenize(*s);
- inpush(dupstring(*s), 0, NULL);
+ inpush(dupstring_wlen(*s, l), 0, NULL);
strinbeg(0);
lexbuf.len = 0;
lexbuf.ptr = tokstr = *s;
@@ -1658,7 +1659,7 @@ parse_subscript(char *s, int sub, int endchar)
if (!*s || *s == endchar)
return 0;
zcontext_save();
- untokenize(t = dupstring(s));
+ untokenize(t = dupstring_wlen(s, l));
inpush(t, 0, NULL);
strinbeg(0);
/*
@@ -1674,7 +1675,7 @@ parse_subscript(char *s, int sub, int endchar)
* length preservation.
*/
lexbuf.len = 0;
- lexbuf.ptr = tokstr = dupstring(s);
+ lexbuf.ptr = tokstr = dupstring_wlen(s, l);
lexbuf.siz = l + 1;
err = dquote_parse(endchar, sub);
toklen = (int)(lexbuf.ptr - tokstr);
@@ -1713,7 +1714,7 @@ parse_subst_string(char *s)
return 0;
zcontext_save();
untokenize(s);
- inpush(dupstring(s), 0, NULL);
+ inpush(dupstring_wlen(s, l), 0, NULL);
strinbeg(0);
lexbuf.len = 0;
lexbuf.ptr = tokstr = s;