guri: Allow params to be NULL if length is 0

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-07-01 11:41:05 +01:00
parent ab33896bcc
commit 67c9d34d71

View File

@ -1781,7 +1781,7 @@ g_uri_parse_params (const gchar *params,
const gchar *end, *attr, *attr_end, *value, *value_end; const gchar *end, *attr, *attr_end, *value, *value_end;
gchar *decoded_attr, *decoded_value; gchar *decoded_attr, *decoded_value;
g_return_val_if_fail (params != NULL, NULL); g_return_val_if_fail (length == 0 || params != NULL, NULL);
g_return_val_if_fail (length >= -1, NULL); g_return_val_if_fail (length >= -1, NULL);
if (case_insensitive) if (case_insensitive)