1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[quickjs] location cast

This commit is contained in:
Witold Filipczyk 2022-01-30 12:52:27 +01:00
parent 348d2ac490
commit a418b17f15

View File

@ -223,7 +223,7 @@ js_location_get_property_pathname(JSContext *ctx, JSValueConst this_val)
return JS_EXCEPTION;
}
const char *query = memchr(vs->uri->data, '?', vs->uri->datalen);
const char *query = (const char *)memchr(vs->uri->data, '?', vs->uri->datalen);
int len = (query ? query - vs->uri->data : vs->uri->datalen);
add_bytes_to_string(&pathname, vs->uri->data, len);
@ -320,7 +320,7 @@ js_location_get_property_search(JSContext *ctx, JSValueConst this_val)
return JS_EXCEPTION;
}
const char *query = memchr(vs->uri->data, '?', vs->uri->datalen);
const char *query = (const char *)memchr(vs->uri->data, '?', vs->uri->datalen);
if (query) {
add_bytes_to_string(&search, query, strcspn(query, "#" POST_CHAR_S));