diff options
Diffstat (limited to 'generic/regc_lex.c')
-rw-r--r-- | generic/regc_lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/regc_lex.c b/generic/regc_lex.c index 1acc3f4..588718d 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -783,7 +783,7 @@ struct vars *v; if (ISERR()) FAILW(REG_EESCAPE); /* ugly heuristic (first test is "exactly 1 digit?") */ - if (v->now - save == 0 || (int)c <= v->nsubexp) { + if (v->now-save == 0 || ((int)c > 0 && (int)c <= v->nsubexp)) { NOTE(REG_UBACKREF); RETV(BACKREF, (chr)c); } |