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') {