fixing bug #132930 with the provided patch, a bit suspicious about it but
* xmlregexp.c: fixing bug #132930 with the provided patch, a bit
suspicious about it but this is fairly contained and regression
tests still passes.
* test/schemas/all1* result/schemas/all1*: added the test to
the regression suite.
Daniel
diff --git a/xmlregexp.c b/xmlregexp.c
index 08b51d8..1706c74 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4325,6 +4325,7 @@
xmlAutomataStatePtr to, const xmlChar *token,
int min, int max, void *data) {
xmlRegAtomPtr atom;
+ int counter;
if ((am == NULL) || (from == NULL) || (token == NULL))
return(NULL);
@@ -4343,10 +4344,22 @@
atom->min = min;
atom->max = max;
- if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
- xmlRegFreeAtom(atom);
- return(NULL);
+ /*
+ * associate a counter to the transition.
+ */
+ counter = xmlRegGetCounter(am);
+ am->counters[counter].min = min;
+ am->counters[counter].max = max;
+
+ /* xmlFAGenerateTransitions(am, from, to, atom); */
+ if (to == NULL) {
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
}
+ xmlRegStateAddTrans(am, from, atom, to, counter, -1);
+ xmlRegAtomPush(am, atom);
+ am->state = to;
+
if (to == NULL)
to = am->state;
if (to == NULL)