commit | 6e8085b425a9d02ac3e204651e2c9d8de9a23a85 | [log] [tgz] |
---|---|---|
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sat May 10 04:42:56 2014 +0300 |
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sat May 10 04:45:15 2014 +0300 |
tree | 40c6b145bf2b01b574940d1cb1dfe046d792d3de | |
parent | 7b0f9a7d9b8a119093ea31c78368b5314bbf23a7 [diff] [blame] |
py: Fix base "detection" for int('0<hexdigit>', 16).
diff --git a/py/parsenumbase.c b/py/parsenumbase.c index 819b665..0057e46 100644 --- a/py/parsenumbase.c +++ b/py/parsenumbase.c
@@ -42,7 +42,9 @@ } else if (*base == 0 && (c | 32) == 'b') { *base = 2; } else { - *base = 10; + if (*base == 0) { + *base = 10; + } p -= 2; } } else if (*base == 8 && c == '0') {