From 4af2c5b93889db3fefb2f9463d93f2bbc5752eb1 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Tue, 14 Apr 2009 15:56:46 +0300 Subject: [PATCH] src/strutil.c: replace call of g_string_append_vprintf() with g_strdup_vprintf and g_string_append Not all versions of glib2 have function g_string_append_vprintf --- src/strutil.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/strutil.c b/src/strutil.c index 1ae8eab67..8bce37170 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); } -- 2.11.4.GIT