diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-10-16 09:34:51 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-10-16 09:34:51 +0000 |
commit | 3c248a0de485f42db15fc8af4f1ccec4cf583f62 (patch) | |
tree | ab2c95476905072d0e0e8aa890f9aeedb79cbbdc /Src | |
parent | b37952c37b6d525e34d84f90306227ab8f6575be (diff) | |
download | zsh-3c248a0de485f42db15fc8af4f1ccec4cf583f62.tar.gz zsh-3c248a0de485f42db15fc8af4f1ccec4cf583f62.tar.xz zsh-3c248a0de485f42db15fc8af4f1ccec4cf583f62.zip |
25905: fix and test doubled-hash radix output
Diffstat (limited to 'Src')
-rw-r--r-- | Src/math.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |