aboutsummaryrefslogtreecommitdiff
path: root/src/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/url.c')
-rw-r--r--src/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/url.c b/src/url.c
index e0349c30..c33bca00 100644
--- a/src/url.c
+++ b/src/url.c
@@ -263,7 +263,7 @@ static Dstr *Url_resolve_relative(const char *RelStr,
} else if (BaseUrl->path) { /* relative path */
dStr_append(Path, BaseUrl->path);
for (i = Path->len; --i >= 0 && Path->str[i] != '/'; ) ;
- if (Path->str[i] == '/')
+ if (i >= 0 && Path->str[i] == '/')
dStr_truncate(Path, ++i);
}
if (RelUrl->path)