summaryrefslogtreecommitdiffstats
path: root/generic/regc_lex.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-30 10:27:33 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-30 10:27:33 (GMT)
commit36ea3f27001c99cbc7cb3cae6894efaffe7fb512 (patch)
treea39e92094fa8fa6c997baa1e9d37be96a31bd97d /generic/regc_lex.c
parent004324cca99a52563cd03e1b7f98b924a3db8d5f (diff)
downloadtcl-36ea3f27001c99cbc7cb3cae6894efaffe7fb512.zip
tcl-36ea3f27001c99cbc7cb3cae6894efaffe7fb512.tar.gz
tcl-36ea3f27001c99cbc7cb3cae6894efaffe7fb512.tar.bz2
Backport of fix for first part of [Bug 1810264]
Diffstat (limited to 'generic/regc_lex.c')
-rw-r--r--generic/regc_lex.c2
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);
}