vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Aug 27 19:28:07 2015 +0300| [57f51316593ec01168bdcd34cb42785f753f4a20] | committer: Rémi Denis-Courmont
url: fix extraction request parameters > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57f51316593ec01168bdcd34cb42785f753f4a20 --- src/text/url.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/text/url.c b/src/text/url.c index fe6f420..9ba900f 100644 --- a/src/text/url.c +++ b/src/text/url.c @@ -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 = "/";*/ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
