X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/a69a3efddbe1261f55e90d4ff477053ab80663a5..025c5f4aa5ffbf8948482a4233318db81c2df5d2:/mptext.c 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));