util.c: uri_makeabs: check initial base URI field, not dest `a` (style)

No functional difference because the base URI host is copied beforehand.
This commit is contained in:
Hiltjo Posthuma 2021-03-01 18:50:43 +01:00
parent fef85e3c39
commit 16b7cc14e0
1 changed files with 1 additions and 1 deletions

2
util.c
View File

@ -166,7 +166,7 @@ uri_makeabs(struct uri *a, struct uri *u, struct uri *b)
} else if (u->path[0] == '/') {
strlcpy(a->path, u->path, sizeof(a->path));
} else {
a->path[0] = (a->host[0] && b->path[0] != '/') ? '/' : '\0';
a->path[0] = (b->host[0] && b->path[0] != '/') ? '/' : '\0';
a->path[1] = '\0';
if ((p = strrchr(b->path, '/'))) {