summaryrefslogtreecommitdiff
path: root/xsltproc
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-08-03 21:40:52 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-08-03 21:40:52 +0000
commit2885c5457c520f6d07859582f509e72343104776 (patch)
tree759064b2547e99cbc554b1f7175bce142a1a36a7 /xsltproc
parentd58accb58878f2163ab2069b605ff330614c6a26 (diff)
downloadlibxslt-2885c5457c520f6d07859582f509e72343104776.tar.gz
libxslt-2885c5457c520f6d07859582f509e72343104776.tar.bz2
libxslt-2885c5457c520f6d07859582f509e72343104776.zip
minor change, avoid wasting CPU cycles Daniel
* xsltproc/xsltproc.c: minor change, avoid wasting CPU cycles Daniel
Diffstat (limited to 'xsltproc')
-rw-r--r--xsltproc/xsltproc.c10
1 files changed, 6 insertions, 4 deletions
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)) {