Johannes Schindelin [off-list ref] writes:
It is not obvious from the diff: `url` is never changed. It would still
point at the first `h`, as you said.
quoted
quoted
+ if (slash - url > 0)
+ c->host = url_decode_mem(host, slash - host);
...
I guess a better condition would be `if (proto_end || slash - host > 0)`.
Yeah, that would probably be more intuitive to read. What triggered
my reaction was the mismatch between "slash - url" in the condition
and "slash - host" that specifies the length of the memory region.