aboutsummaryrefslogtreecommitdiffstats
path: root/xmlregexp.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-08-09 21:40:08 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-08-09 21:40:08 +0000
commit4f82c8a161404d1fe6ca9fe6edb404df00e14f11 (patch)
tree4748aa7019e77028fa31f705c5d37d4ca5c73e2a /xmlregexp.c
parent76d73f5bc5544e967dc2e4b76730544b7f2a5626 (diff)
downloadandroid_external_libxml2-4f82c8a161404d1fe6ca9fe6edb404df00e14f11.tar.gz
android_external_libxml2-4f82c8a161404d1fe6ca9fe6edb404df00e14f11.tar.bz2
android_external_libxml2-4f82c8a161404d1fe6ca9fe6edb404df00e14f11.zip
fixed a determinism detection problem exposed by ##other tests commited by
* xmlregexp.c: fixed a determinism detection problem exposed by ##other tests commited by Kasimier, also added a small speedup of determinism detection. * test/results/any6_2_0* any8_1_0* any7_1_2* any7_2_2*: added the results to the regression tests now Daniel
Diffstat (limited to 'xmlregexp.c')
-rw-r--r--xmlregexp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmlregexp.c b/xmlregexp.c
index cf5f942e..8eed8b23 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -1981,6 +1981,8 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
state = ctxt->states[statenr];
if (state == NULL)
continue;
+ if (state->nbTrans < 2)
+ continue;
for (transnr = 0;transnr < state->nbTrans;transnr++) {
t1 = &(state->trans[transnr]);
/*
@@ -2804,6 +2806,14 @@ xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr) {
* Eval if we have a wildcard for the current item.
*/
if (*expStr != *valStr) {
+ /* if one of them starts with a wildcard make valStr be it */
+ if (*valStr == '*') {
+ const xmlChar *tmp;
+
+ tmp = valStr;
+ valStr = expStr;
+ expStr = tmp;
+ }
if ((*valStr != 0) && (*expStr != 0) && (*expStr++ == '*')) {
do {
if (*valStr == XML_REG_STRING_SEPARATOR)