diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -345,18 +345,17 @@ re_update(NODE *t) { NODE *t1; + if (t->type == Node_val && (t->flags & REGEX) != 0) + return t->tre_regs; + if ((t->re_flags & CASE) == IGNORECASE) { /* regex was compiled with settings matching IGNORECASE */ if ((t->re_flags & CONSTANT) != 0) { /* it's a constant, so just return it as is */ - assert(t->type == Node_regex || t->type == Node_typedregex); + assert(t->type == Node_regex); return t->re_reg; } t1 = t->re_exp; - if (t1->type == Node_typedregex) { - assert((t1->re_flags & CONSTANT) != 0); - return t1->re_reg; - } if (t->re_text != NULL) { /* if contents haven't changed, just return it */ if (cmp_nodes(t->re_text, t1, true) == 0) |