core build system and array, it compiles!

This commit is contained in:
Krzosa Karol
2023-04-02 11:16:13 +02:00
parent 2be13cee30
commit 9bb355ed93
12 changed files with 45 additions and 192 deletions

View File

@@ -1437,7 +1437,7 @@ void bigint_shl_int(BigInt *dest, const BigInt *op1, uint64_t shift) {
uint64_t leftover_shift_count = shift % 64;
dest->digits = ALLOC_DIGITS(op1->digit_count + digit_shift_count + 1);
dest->digit_count = digit_shift_count;
dest->digit_count = (unsigned)digit_shift_count;
uint64_t carry = 0;
for (size_t i = 0; i < op1->digit_count; i += 1) {
uint64_t digit = op1_digits[i];
@@ -1495,7 +1495,7 @@ void bigint_shr(BigInt *dest, const BigInt *op1, const BigInt *op2) {
return bigint_init_unsigned(dest, 0);
}
dest->digit_count = op1->digit_count - digit_shift_count;
dest->digit_count = (unsigned)(op1->digit_count - digit_shift_count);
uint64_t *digits;
if (dest->digit_count == 1) {
digits = &dest->digit;