diff options
-rw-r--r-- | src/regex/regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 4d80cb1c..dfa9727c 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -839,7 +839,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s) s--; break; default: - if (!ere && isdigit(*s)) { + if (!ere && (unsigned)*s-'1' < 9) { /* back reference */ int val = *s - '0'; node = tre_ast_new_literal(ctx->mem, BACKREF, val, ctx->position); |