From 3c248a0de485f42db15fc8af4f1ccec4cf583f62 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 16 Oct 2008 09:34:51 +0000 Subject: 25905: fix and test doubled-hash radix output --- Src/math.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/math.c') diff --git a/Src/math.c b/Src/math.c index 241445979..29556d973 100644 --- a/Src/math.c +++ b/Src/math.c @@ -670,7 +670,8 @@ zzlex(void) } if(*ptr != ']') goto bofs; - if (outputradix < 2 || outputradix > 36) { + n = (outputradix < 0) ? -outputradix : outputradix; + if (n < 2 || n > 36) { zerr("invalid base (must be 2 to 36 inclusive): %d", outputradix); return EOI; -- cgit 1.4.1