summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/lex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 44ad88043..fa29da3a2 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1626,7 +1626,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 +1658,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 +1674,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 +1713,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;