From 056326c1e96db2c2101fa320062e0c9146f0d73f Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Thu, 15 Apr 2010 10:11:30 -0400 Subject: [PATCH] g_string_append_len() accept NULL with length == 0 --- glib/gstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gstring.c b/glib/gstring.c index 5a6b5df39..c231f3ee0 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -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); }