aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/re.c b/re.c
index e30b8b4c..77d6f6fb 100644
--- a/re.c
+++ b/re.c
@@ -355,6 +355,10 @@ re_update(NODE *t)
return t->re_reg;
}
t1 = t->re_exp;
+ if (t1->type == Node_hardregex) {
+ 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) == 0)