From d9bd3181330830c49e714609e86eaa3e39a884ca Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Thu, 12 Jun 2008 21:45:38 +0000 Subject: 20080612-2245 --- libmp/port/mptoui.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libmp/port/mptoui.c') diff --git a/libmp/port/mptoui.c b/libmp/port/mptoui.c index 9d80c1df..41c0b0b6 100644 --- a/libmp/port/mptoui.c +++ b/libmp/port/mptoui.c @@ -25,11 +25,9 @@ mptoui(mpint *b) uint x; x = *b->p; - if(b->sign < 0){ + if(b->sign < 0) x = 0; - } else { - if(b->top > 1 || x > MAXUINT) - x = MAXUINT; - } + else if(b->top > 1 || (sizeof(mpdigit) > sizeof(uint) && x > MAXUINT)) + x = MAXUINT; return x; } -- cgit v1.2.3