Bit Negating now works properly for different types

This commit is contained in:
Krzosa Karol
2022-06-06 17:14:42 +02:00
parent 7173557d26
commit d042251c21
4 changed files with 57 additions and 44 deletions

View File

@@ -127,6 +127,8 @@ bigint_copy(Allocator *allocator, BigInt *src){
}
dest.is_negative = src->is_negative;
dest.digit_count = src->digit_count;
count_bigint_alloc();
dest.digits = exp_alloc_array(allocator, uint64_t, dest.digit_count, AF_ZeroMemory);
memcpy(dest.digits, src->digits, sizeof(uint64_t) * dest.digit_count);
return dest;