mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
big: fix itoa base PoT other than 16.
This commit is contained in:
@@ -200,7 +200,7 @@ int_itoa_raw :: proc(a: ^Int, radix: i8, buffer: []u8, size := int(-1), zero_ter
|
||||
count, err = count_bits(a);
|
||||
digit: _WORD;
|
||||
|
||||
for offset := 0; offset < count; offset += 4 {
|
||||
for offset := 0; offset < count; offset += shift {
|
||||
bits_to_get := int(min(count - offset, shift));
|
||||
if digit, err = int_bitfield_extract(a, offset, bits_to_get); err != .None {
|
||||
return len(buffer) - available, .Invalid_Argument;
|
||||
|
||||
Reference in New Issue
Block a user