g_string_append_len() accept NULL with length == 0

This commit is contained in:
Ryan Lortie 2010-04-15 10:11:30 -04:00
parent 066df8d867
commit 056326c1e9

View File

@ -874,7 +874,7 @@ g_string_append_len (GString *string,
gssize len)
{
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (val != NULL, string);
g_return_val_if_fail (len == 0 || val != NULL, string);
return g_string_insert_len (string, -1, val, len);
}