From 25b5e686cfe5f99854a227e09309a629a9acde2a Mon Sep 17 00:00:00 2001 From: mdw Date: Wed, 1 Dec 2004 01:30:42 +0000 Subject: [PATCH] Allow base 255 (or whatever) in mptext. --- mptext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mptext.c b/mptext.c index d528386..9cca8a8 100644 --- a/mptext.c +++ b/mptext.c @@ -155,7 +155,7 @@ mp *mp_read(mp *m, int radix, const mptext_ops *ops, void *p) r = -1; } else if (radix < 0) { rd = -radix; - assert(((void)"binary radix must fit in a byte", rd < UCHAR_MAX)); + assert(((void)"binary radix must fit in a byte", rd <= UCHAR_MAX)); r = -1; } else if (ch != '0') { rd = 10; @@ -669,7 +669,7 @@ int mp_write(mp *m, int radix, const mptext_ops *ops, void *p) if (radix > 0) assert(((void)"ascii radix must be <= 62", radix <= 62)); else if (radix < 0) - assert(((void)"binary radix must fit in a byte", -radix < UCHAR_MAX)); + assert(((void)"binary radix must fit in a byte", -radix <= UCHAR_MAX)); else assert(((void)"radix can't be zero in mp_write", 0)); -- 2.11.0