mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
21194: fix handling of zero-length quoted test strings for patterns
This commit is contained in:
parent
ce49d62d45
commit
ba1a545516
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-04-26 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 21195 (c.f. 21194 from Bart): Src/pattern.c,
|
||||
Test/D04parameter.ztst: 21170 broke handling of zero-length
|
||||
quoted test strings.
|
||||
|
||||
2005-04-25 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 21184: Test/B04read.ztst: test for foregoing fix.
|
||||
|
|
|
@ -1552,8 +1552,10 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalen,
|
|||
*nump = 0;
|
||||
}
|
||||
/* inherited from domatch, but why, exactly? */
|
||||
if (*string == Nularg)
|
||||
if (*string == Nularg) {
|
||||
string++;
|
||||
unmetalen--;
|
||||
}
|
||||
|
||||
if (stringlen < 0)
|
||||
stringlen = strlen(string);
|
||||
|
|
|
@ -599,3 +599,8 @@
|
|||
>said
|
||||
>i
|
||||
>willJOYCE
|
||||
|
||||
foo=
|
||||
print "${${foo}/?*/replacement}"
|
||||
0:Quoted zero-length strings are handled properly
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue