Commit 57f51316 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

url: fix extraction request parameters

parent 623d18e6
......@@ -395,17 +395,23 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt)
cur = next;
}
/* Query parameters */
if (opt != '\0')
{
char *query = strchr (cur, opt);
if (query != NULL)
{
*(query++) = '\0';
url->psz_option = query;
}
}
/* Path */
next = strchr (cur, '/');
if (next != NULL)
{
*next = '\0'; /* temporary nul, reset to slash later */
url->psz_path = next;
if (opt && (next = strchr (next + 1, opt)) != NULL)
{
*(next++) = '\0';
url->psz_option = next;
}
}
/*else
url->psz_path = "/";*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment