zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit eeb043f5833db03ac3250f9943ba8be0b518432f (tree)
parent 70d7f87be00aa1a372c856759948fd62666be295
Author: Cody Tapscott <topolarity@tapscott.me>
Date:   Fri, 11 Feb 2022 08:46:01 -0700

Fix big-endian handling in stage1 bigint_write_twos_complement

Diffstat:
Msrc/stage1/bigint.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stage1/bigint.cpp b/src/stage1/bigint.cpp @@ -313,12 +313,12 @@ void bigint_write_twos_complement(const BigInt *big_int, uint8_t *buf, size_t bi } if (digit_index == 0) break; - digit_index -= 1; if (digit_index == last_digit_index) { buf_index += bytes_in_last_digit; } else { buf_index += 8; } + digit_index -= 1; } } else { size_t digit_count = (bit_count + 63) / 64;