From 08774a9c74e9ddd302ac0d5feaa5ccd69707319b Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 1 Jul 2019 20:04:26 +0200 Subject: [PATCH] Fix ntoab. Follow-up to b5b19304b59fefbed923b146ec8c8d495556fa76. * lib/mes/ntoab.c (ntoab): Fix non-MESC case. --- lib/mes/ntoab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mes/ntoab.c b/lib/mes/ntoab.c index 4b305925..548e45eb 100644 --- a/lib/mes/ntoab.c +++ b/lib/mes/ntoab.c @@ -45,7 +45,7 @@ ntoab (long x, int base, int signed_p) #if __MESC__ u = __mesabi_uldiv(u, (unsigned long) base, &i); #else - i = i % base; + i = u % base; u = u / base; #endif *p-- = i > 9 ? 'a' + i - 10 : '0' + i;