From bc69e46ad112ff3680a18f6c5361894d74194e80 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 24 Aug 2008 10:40:38 +0000 Subject: [PATCH] x86_64 fixes --- lib/mprintf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mprintf.c b/lib/mprintf.c index 1e5235769..1bbf53ade 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -776,10 +776,11 @@ static int dprintf_formatf( /* Decimal integer. */ base = 10; - is_neg = (p->data.num.as_signed < (mp_intmax_t)0) ? 1 : 0; + signed_num = p->data.num.as_signed; + is_neg = (signed_num < (mp_intmax_t)0) ? 1 : 0; if(is_neg) { /* signed_num might fail to hold absolute negative minimum by 1 */ - signed_num = p->data.num.as_signed + (mp_intmax_t)1; + signed_num += (mp_intmax_t)1; signed_num = -signed_num; num = (mp_uintmax_t)signed_num; num += (mp_uintmax_t)0x1;