From 908ebb29ff621f582b34d48fd4278b60b78379b6 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 3 May 2012 10:54:16 +0100 Subject: [PATCH] mpint.c (touint): Compare unsigned with unsigned, not unsigned long. Otherwise the tests fail on LP64 platforms. --- mpint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpint.c b/mpint.c index 244ff9a..7c1b8cc 100644 --- a/mpint.c +++ b/mpint.c @@ -128,7 +128,7 @@ static int touint(dstr *v) unsigned j = mp_touint(m); int ok = 1; - if (i != j) { + if ((unsigned)i != j) { fputs("\n*** touint failed.\n", stderr); fputs("m = ", stderr); mp_writefile(m, stderr, 10); fprintf(stderr, "\nexpect = %lu; result = %u\n", i, j); -- 2.11.0