summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/uri.c b/uri.c
index 55210a6..f62a3f6 100644
--- a/uri.c
+++ b/uri.c
@@ -2095,10 +2095,12 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
if (ref->path[ix] == '/')
break;
}
- if (ix == 0)
+ if (ix == 0) {
uptr = (xmlChar *)ref->path;
- else
- uptr = (xmlChar *)&ref->path[ix + 1];
+ } else {
+ ix++;
+ uptr = (xmlChar *)&ref->path[ix];
+ }
/*
* In base, count the number of '/' from the differing point
@@ -2114,7 +2116,6 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
val = xmlStrdup (uptr);
goto done;
}
- nbslash--;
/*
* Allocate just enough space for the returned string -