about summary refs log tree commit diff
path: root/src/regex/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/regcomp.c')
-rw-r--r--src/regex/regcomp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
index 01d42a8e..33213257 100644
--- a/src/regex/regcomp.c
+++ b/src/regex/regcomp.c
@@ -2139,6 +2139,11 @@ tre_copy_ast(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *ast,
 		*result = tre_ast_new_literal(mem, min, max, pos);
 		if (*result == NULL)
 		  status = REG_ESPACE;
+		else {
+		  tre_literal_t *p = (*result)->obj;
+		  p->class = lit->class;
+		  p->neg_classes = lit->neg_classes;
+		}
 
 		if (pos > *max_pos)
 		  *max_pos = pos;