changeset 354:e96015ed35d0

Change where we bail out from th_printf_vput_int() when th_printf_vbuf_int*() fail.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 25 Feb 2016 09:24:08 +0200
parents 2bf43a139542
children 5016bf56e5d8
files th_string.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Thu Feb 25 09:17:54 2016 +0200
+++ b/th_string.c	Thu Feb 25 09:24:08 2016 +0200
@@ -192,12 +192,12 @@
             f_radix, f_flags, f_prec, f_unsig, &f_neg);
     }
 
+    if (ret == EOF)
+        return ret;
+
     f_altstr = ret != 0 && (f_flags & TH_PF_ALT) && f_alt != NULL ? f_alt(f_flags) : NULL;
     if (f_flags & TH_PF_ALT) f_width = 0;
 
-    if (ret == EOF)
-        return ret;
-
     // Are we using a sign prefix?
     f_sign = f_unsig ? 0 : ((f_flags & TH_PF_SIGN) ?
         (f_neg ? '-' : '+') :