mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
36552 plus test: fix Nularg string in quotestring(QT_DOLLARS)
This commit is contained in:
parent
9955bbdb9f
commit
18130bed7f
3 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2015-09-17 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* unposted: Test/D04parameter.ztst: test for 36552
|
||||||
|
|
||||||
|
* 36552: Src/utils.c: fix Nularg string in quotestring(QT_DOLLARS)
|
||||||
|
|
||||||
2015-09-14 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2015-09-14 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
* unposted: Doc/Zsh/zle.yo README: docs: Typo fixes
|
* unposted: Doc/Zsh/zle.yo README: docs: Typo fixes
|
||||||
|
|
|
@ -5384,6 +5384,12 @@ quotestring(const char *s, char **e, int instring)
|
||||||
"BUG: bad quote type in quotestring");
|
"BUG: bad quote type in quotestring");
|
||||||
u = s;
|
u = s;
|
||||||
if (instring == QT_DOLLARS) {
|
if (instring == QT_DOLLARS) {
|
||||||
|
/*
|
||||||
|
* The only way to get Nularg here is when
|
||||||
|
* it is placeholding for the empty string?
|
||||||
|
*/
|
||||||
|
if (inull(*u))
|
||||||
|
*u++;
|
||||||
/*
|
/*
|
||||||
* As we test for printability here we need to be able
|
* As we test for printability here we need to be able
|
||||||
* to look for multibyte characters.
|
* to look for multibyte characters.
|
||||||
|
|
|
@ -413,6 +413,10 @@
|
||||||
>$'playing \'stupid\' "games" \\w\\i\\t\\h $quoting.'
|
>$'playing \'stupid\' "games" \\w\\i\\t\\h $quoting.'
|
||||||
>'playing '\'stupid\'' "games" \w\i\t\h $quoting.'
|
>'playing '\'stupid\'' "games" \w\i\t\h $quoting.'
|
||||||
|
|
||||||
|
print -r ${(qqqq):-""}
|
||||||
|
0:workers/36551: literal empty string in ${(qqqq)...}
|
||||||
|
>$''
|
||||||
|
|
||||||
x=( a '' '\b' 'c d' '$e' )
|
x=( a '' '\b' 'c d' '$e' )
|
||||||
print -r ${(q)x}
|
print -r ${(q)x}
|
||||||
print -r ${(q-)x}
|
print -r ${(q-)x}
|
||||||
|
|
Loading…
Reference in a new issue