From: Martin Mares Date: Sun, 24 Oct 1999 20:14:51 +0000 (+0000) Subject: Don't kill fragment references if there aren't any. X-Git-Tag: holmes-import~1662 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c0fcee231dbc01d34476a377ca6778d145520813;p=libucw.git Don't kill fragment references if there aren't any. --- 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; }