diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-03-19 21:03:29 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-03-19 21:03:29 +0000 |
| commit | c6ff961088c3b64e68cb5da661d9b00002958795 (patch) | |
| tree | 8ffa359dc0aad3ffba7c970f866b6ae5d4e59866 /core | |
| parent | c26990c22daf6d2e09948b38366f457496f16cfe (diff) | |
Add base 12 in strconv.odin
Diffstat (limited to 'core')
| -rw-r--r-- | core/fmt.odin | 2 | ||||
| -rw-r--r-- | core/strconv.odin | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/fmt.odin b/core/fmt.odin index ceae65e82..ae2d340e8 100644 --- a/core/fmt.odin +++ b/core/fmt.odin @@ -498,7 +498,7 @@ _write_int :: proc(fi: ^Fmt_Info, u: u64, base: int, is_signed: bool, bit_size: } match base { - case 2, 8, 10, 16: + case 2, 8, 10, 12, 16: break; default: panic("_write_int: unknown base, whoops"); diff --git a/core/strconv.odin b/core/strconv.odin index 5710e76de..5a14d6660 100644 --- a/core/strconv.odin +++ b/core/strconv.odin @@ -342,6 +342,7 @@ append_bits :: proc(buf: []byte, u: u64, base: int, is_signed: bool, bit_size: i case 2: i--; a[i] = 'b'; case 8: i--; a[i] = 'o'; case 10: i--; a[i] = 'd'; + case 12: i--; a[i] = 'z'; case 16: i--; a[i] = 'x'; default: ok = false; } |