Index: glib/gstring.c
===================================================================
RCS file: /cvs/gnome/glib/glib/gstring.c,v
retrieving revision 1.34
diff -u -b -B -p -r1.34 gstring.c
--- glib/gstring.c	4 Dec 2002 01:27:43 -0000	1.34
+++ glib/gstring.c	26 Feb 2003 00:35:26 -0000
@@ -235,10 +235,17 @@ g_string_new (const gchar *init)
 {
   GString *string;
 
-  string = g_string_sized_new (init ? strlen (init) + 2 : 2);
+  if (init == NULL || *init == '\0')
+    string = g_string_sized_new (2);
+  else 
+    {
+      gint len;
 
-  if (init)
-    g_string_append (string, init);
+      len = strlen (init);
+      string = g_string_sized_new (len + 2);
+
+      g_string_append_len (string, init, len);
+    }
 
   return string;
 }
