Repository navigation
Commit def19a1
committed
fix: return 0x0 from octal_to_hex("0")
The loop builds no hex digit for 0, so the function returned '0x'. The check in the module's own __main__ block expects '0x' + hex(int(num, 8))[2:].upper(), which is '0x0'.1 parent 6e03a48 commit def19a1
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments