aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xs_url.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs_url.h b/xs_url.h
index fd320a4..8e2e243 100644
--- a/xs_url.h
+++ b/xs_url.h
@@ -17,6 +17,9 @@ xs_str *xs_url_dec(const char *str)
xs_str *s = xs_str_new(NULL);
while (*str) {
+ if (!xs_is_string(str))
+ break;
+
if (*str == '%') {
unsigned int i;