diff --git a/src/strutil.c b/src/strutil.c index 997c25573..4dc3a154f 100644 --- a/src/strutil.c +++ b/src/strutil.c @@ -252,9 +252,17 @@ str_vfs_convert_to (GIConv coder, const char *string, int size, void str_printf (GString * buffer, const char *format, ...) { + gchar *tmp; va_list ap; va_start (ap, format); - g_string_append_vprintf (buffer, format, ap); + /* + * more simple call: + g_string_append_vprintf (buffer, format, ap); + * but not all versions of glib2 have this function :( + */ + tmp = g_strdup_vprintf ( format, ap); + g_string_append (buffer, tmp); + g_free(tmp); va_end (ap); }