fix nsurl sizeof/offsetof

This commit is contained in:
Ori Bernstein 2020-02-03 01:28:50 +00:00 committed by Michael Drake
parent 7d06021e21
commit bf427e3b2a
1 changed files with 2 additions and 2 deletions

View File

@ -1316,7 +1316,7 @@ nserror nsurl_create(const char * const url_s, nsurl **url)
}
e = nsurl__components_to_string(&c, NSURL_WITH_FRAGMENT,
sizeof(nsurl), (char **)url, &length);
offsetof(nsurl, string), (char **)url, &length);
if (e != NSERROR_OK) {
return e;
}
@ -1554,7 +1554,7 @@ nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
}
error = nsurl__components_to_string(&c, NSURL_WITH_FRAGMENT,
sizeof(nsurl), (char **)joined, &length);
offsetof(nsurl, string), (char **)joined, &length);
if (error != NSERROR_OK) {
return error;
}