From c0fcee231dbc01d34476a377ca6778d145520813 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 24 Oct 1999 20:14:51 +0000 Subject: [PATCH] Don't kill fragment references if there aren't any. --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index 9b031694..3c1a0b8b 100644 --- a/lib/url.c +++ b/lib/url.c @@ -375,7 +375,7 @@ url_canonicalize(struct url *u) kill_end_dot(u->host); if ((!u->rest || !*u->rest) && url_proto_path_flags[u->protoid]) u->rest = "/"; - if (c = strchr(u->rest, '#')) /* Kill fragment reference */ + if (u->rest && (c = strchr(u->rest, '#'))) /* Kill fragment reference */ *c = 0; return 0; } -- 2.39.5