mirror of git://git.code.sf.net/p/zsh/code
33566: regex module fix for unmatched parentheses
This commit is contained in:
parent
ea0f612c3a
commit
7d588bc158
|
@ -1,3 +1,8 @@
|
|||
2015-06-22 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 35566: Src/Modules/regex.c: didn't handle faile
|
||||
parenthesis matches.
|
||||
|
||||
2015-06-22 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 35554: Doc/Zsh/contrib.yo: Document narrow-to-region -l and -r.
|
||||
|
|
|
@ -155,6 +155,11 @@ zcond_regex_match(char **a, int id)
|
|||
++n, ++m, ++bptr, ++eptr)
|
||||
{
|
||||
char buf[DIGBUFSIZE];
|
||||
if (m->rm_so < 0 || m->rm_eo < 0) {
|
||||
*bptr = ztrdup("-1");
|
||||
*eptr = ztrdup("-1");
|
||||
continue;
|
||||
}
|
||||
ptr = lhstr;
|
||||
leftlen = m->rm_so;
|
||||
offs = 0;
|
||||
|
|
Loading…
Reference in New Issue