mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
Correctly use g_printf_string_upper_bound in g_string_append_vprintf.
2007-06-16 Mathias Hasselmann <mathias.hasselmann@gmx.de> * glib/gstring.c: Correctly use g_printf_string_upper_bound in g_string_append_vprintf. Fixes #447933. svn path=/trunk/; revision=5570
This commit is contained in:
parent
41294a7468
commit
506fd2d2e1
@ -1,3 +1,8 @@
|
||||
2007-06-16 Mathias Hasselmann <mathias.hasselmann@gmx.de>
|
||||
|
||||
* glib/gstring.c: Correctly use g_printf_string_upper_bound
|
||||
in g_string_append_vprintf. Fixes #447933.
|
||||
|
||||
2007-06-15 Sebastian Wilhelmi <wilhelmi@google.com>
|
||||
|
||||
* docs/reference/glib/tmpl/threads.sgml: Extended the comments on
|
||||
|
@ -1278,12 +1278,16 @@ g_string_append_vprintf (GString *string,
|
||||
const gchar *fmt,
|
||||
va_list args)
|
||||
{
|
||||
va_list sneak;
|
||||
gsize length;
|
||||
|
||||
g_return_if_fail (string != NULL);
|
||||
g_return_if_fail (fmt != NULL);
|
||||
|
||||
length = g_printf_string_upper_bound (fmt, args);
|
||||
G_VA_COPY (sneak, args);
|
||||
length = g_printf_string_upper_bound (fmt, sneak);
|
||||
va_end (sneak);
|
||||
|
||||
g_string_maybe_expand (string, length);
|
||||
length = g_vsnprintf (string->str + string->len, length, fmt, args);
|
||||
string->len += length;
|
||||
|
Loading…
Reference in New Issue
Block a user