mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 18:16:34 +02:00
fix negative exponent handling (numbers<0).
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org> * glib/gmessages.c (printf_string_upper_bound): fix negative exponent handling (numbers<0). * glib/gutils.h (g_bit_storage): take a gulong as argument. same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. Tue Jul 10 18:50:16 2001 Tim Janik <timj@gtk.org> * gsignal.h (struct _GSignalQuery): fix misplaced comment.
This commit is contained in:
@@ -1158,7 +1158,7 @@ printf_string_upper_bound (const gchar *format,
|
||||
|
||||
exp -= G_IEEE754_DOUBLE_BIAS;
|
||||
exp = exp * G_LOG_2_BASE_10 + 1;
|
||||
conv_len += exp;
|
||||
conv_len += ABS (exp); /* exp can be <0 */
|
||||
}
|
||||
/* some printf() implementations require extra padding for rounding */
|
||||
conv_len += 2;
|
||||
|
Reference in New Issue
Block a user