diff --git a/ChangeLog b/ChangeLog index fba80fcd..05cfea9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Aug 3 17:40:13 EDT 2003 Daniel Veillard + + * xsltproc/xsltproc.c: minor change, avoid wasting CPU cycles + Sun Aug 3 21:05:07 HKT 2003 William Brack Minor cleanup of regression test general/bug-125 diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index ac4ead3a..28a64797 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -163,10 +163,12 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID, const char *lastsegment = URL; const char *iter = URL; - while (*iter != 0) { - if (*iter == '/') - lastsegment = iter + 1; - iter++; + if (nbpaths > 0) { + while (*iter != 0) { + if (*iter == '/') + lastsegment = iter + 1; + iter++; + } } if ((ctxt != NULL) && (ctxt->sax != NULL)) {