(parse_reg_exp): If '|' is immediately followed by another '|', end of regex or enclosing ')', clear branch.
This commit is contained in:
parent
f7c1f4dd1c
commit
9b88fc1667
|
@ -1807,6 +1807,8 @@ parse_reg_exp (regexp, preg, token, syntax, nest, err)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
branch = NULL;
|
||||||
tree = create_tree (tree, branch, 0, new_idx);
|
tree = create_tree (tree, branch, 0, new_idx);
|
||||||
if (BE (new_idx == -1 || tree == NULL, 0))
|
if (BE (new_idx == -1 || tree == NULL, 0))
|
||||||
return *err = REG_ESPACE, NULL;
|
return *err = REG_ESPACE, NULL;
|
||||||
|
|
Loading…
Reference in a new issue