diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/pattern.c | 4 | ||||
-rw-r--r-- | Test/D04parameter.ztst | 5 |
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 2b63a50ab..fde7347c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Src/pattern.c b/Src/pattern.c index 1033c776f..ed88bb7ce 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -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); diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 5700a0722..7f2ed4670 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -599,3 +599,8 @@ >said >i >willJOYCE + + foo= + print "${${foo}/?*/replacement}" +0:Quoted zero-length strings are handled properly +> |