[glib/glib-2-42] gnulib/vasprintf: handle unsigned modifier for long long



commit d91d12d1114e6234556251b07235df290218a097
Author: Aurélien Zanelli <aurelien zanelli parrot com>
Date:   Tue Feb 3 15:41:05 2015 +0100

    gnulib/vasprintf: handle unsigned modifier for long long
    
    Otherwise, an unsigned integer will be displayed as a signed one if we
    use internal printf and if HAVE_LONG_LONG_FORMAT is not defined.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743936

 glib/gnulib/vasnprintf.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glib/gnulib/vasnprintf.c b/glib/gnulib/vasnprintf.c
index ee0a43a..018e0d9 100644
--- a/glib/gnulib/vasnprintf.c
+++ b/glib/gnulib/vasnprintf.c
@@ -123,6 +123,11 @@ print_long_long (char *buf,
       digits = upper;
       negative = FALSE;
       break;
+    case 'u':
+      base = 10;
+      digits = lower;
+      negative = FALSE;
+      break;
     default:
       base = 10;
       digits = lower;


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