summaryrefslogtreecommitdiff
path: root/utils/nsurl/nsurl.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nsurl/nsurl.c')
-rw-r--r--utils/nsurl/nsurl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 5e90405a2..50cc15e82 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -916,7 +916,7 @@ nserror nsurl_parent(const nsurl *url, nsurl **new_url)
} else if (old_path_len == new_path_len) {
lwc_path = lwc_string_ref(url->components.path);
} else {
- if (lwc_intern_string(path, old_path_len - new_path_len,
+ if (lwc_intern_string(path, new_path_len,
&lwc_path) != lwc_error_ok) {
free(*new_url);
return NSERROR_NOMEM;