changeset 360:b1984383aaac

We should OR to the flags instead of forcing them for %p. :S
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 25 Feb 2016 11:51:52 +0200
parents 9ca9ef4e3656
children ad9719373fe3
files th_string.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Thu Feb 25 11:50:43 2016 +0200
+++ b/th_string.c	Thu Feb 25 11:51:52 2016 +0200
@@ -405,9 +405,9 @@
 
                 case 'p':
 #if (TH_PTRSIZE == 32)
-                    f_flags = TH_PF_LONG;
+                    f_flags |= TH_PF_LONG;
 #elif (TH_PTRSIZE == 64)
-                    f_flags = TH_PF_LONGLONG;
+                    f_flags |= TH_PF_LONGLONG;
 #endif
                     f_flags |= TH_PF_ALT;
                     if ((ret = th_printf_vput_int(ctx, vputch, ap, 16, f_flags, f_width, f_prec, TRUE, th_printf_altfmt_hex)) == EOF)