authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-02-11 08:46:01-07:00
committergravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-02-11 08:49:24-07:00
logeeb043f5833db03ac3250f9943ba8be0b518432f
tree3f72dc0f889d3612c06bcad655a8f08d3a5c64fc
parent70d7f87be00aa1a372c856759948fd62666be295

Fix big-endian handling in stage1 bigint_write_twos_complement


1 files changed, 1 insertions(+), 1 deletions(-)

src/stage1/bigint.cpp+1-1
...@@ -313,12 +313,12 @@ void bigint_write_twos_complement(const BigInt *big_int, uint8_t *buf, size_t bi...@@ -313,12 +313,12 @@ void bigint_write_twos_complement(const BigInt *big_int, uint8_t *buf, size_t bi
313 }313 }
314314
315 if (digit_index == 0) break;315 if (digit_index == 0) break;
316 digit_index -= 1;
317 if (digit_index == last_digit_index) {316 if (digit_index == last_digit_index) {
318 buf_index += bytes_in_last_digit;317 buf_index += bytes_in_last_digit;
319 } else {318 } else {
320 buf_index += 8;319 buf_index += 8;
321 }320 }
321 digit_index -= 1;
322 }322 }
323 } else {323 } else {
324 size_t digit_count = (bit_count + 63) / 64;324 size_t digit_count = (bit_count + 63) / 64;