glib r7115 - in branches/glib-2-16: . glib



Author: matthiasc
Date: Mon Jun 30 22:40:13 2008
New Revision: 7115
URL: http://svn.gnome.org/viewvc/glib?rev=7115&view=rev

Log:
        Bug 502511 â g_assert_cmphex prints invalid message

        * glib/gtestutils.c (g_assertion_message_cmpnum): Actually print
        hex numbers in hex.
        Pointed out by Tor Lillqvist



Modified:
   branches/glib-2-16/ChangeLog
   branches/glib-2-16/glib/gtestutils.c

Modified: branches/glib-2-16/glib/gtestutils.c
==============================================================================
--- branches/glib-2-16/glib/gtestutils.c	(original)
+++ branches/glib-2-16/glib/gtestutils.c	Mon Jun 30 22:40:13 2008
@@ -1245,7 +1245,7 @@
   switch (numtype)
     {
     case 'i':   s = g_strdup_printf ("assertion failed (%s): (%.0Lf %s %.0Lf)", expr, arg1, cmp, arg2); break;
-    case 'x':   s = g_strdup_printf ("assertion failed (%s): (0x%08" G_GUINT64_FORMAT " %s 0x%08" G_GUINT64_FORMAT ")", expr, (guint64) arg1, cmp, (guint64) arg2); break;
+    case 'x':   s = g_strdup_printf ("assertion failed (%s): (0x%08" G_GINT64_MODIFIER "x %s 0x%08" G_GINT64_MODIFIER "x)", expr, (guint64) arg1, cmp, (guint64) arg2); break;
     case 'f':   s = g_strdup_printf ("assertion failed (%s): (%.9Lg %s %.9Lg)", expr, arg1, cmp, arg2); break;
       /* ideally use: floats=%.7g double=%.17g */
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]