1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 12:56:04 +02:00

19308: zsh crashes with $((##))

This commit is contained in:
Oliver Kiddle 2003-12-17 20:47:39 +00:00
parent f8c004aa61
commit 76bd48d674
3 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2003-12-17 Oliver Kiddle <opk@zsh.org>
* 19308: Src/utils.c, Test/C01arith.ztst: zsh crashes with $((##))
2003-12-16 Oliver Kiddle <opk@zsh.org>
* 19299: Completion/Unix/Command/_mount: try to handle

View File

@ -3643,7 +3643,10 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
}
DPUTS(fromwhere == 4, "BUG: unterminated $' substitution");
*t = '\0';
*len = t - buf;
if (fromwhere == 6)
*misc = 0;
else
*len = t - buf;
return buf;
}

View File

@ -68,6 +68,14 @@
0:#, ## and $#
>117
print $((##))
0:## without following character
>0
print $((## ))
0:## followed by a space
>32
integer i
(( i = 3 + 5 * 1.75 ))
print $i