mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #4900 from Barinzaya/fix-bitset-xor-changes-enum
Fix `~bit_set[Some_Enum]` altering the enum
This commit is contained in:
+2
-3
@@ -2599,9 +2599,8 @@ gb_internal ExactValue exact_bit_set_all_set_mask(Type *type) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
BigInt shift_amount = f->Constant.value.value_integer;
|
BigInt shift_amount = {};
|
||||||
big_int_sub_eq(&shift_amount, &b_lower_base);
|
big_int_sub(&shift_amount, &f->Constant.value.value_integer, &b_lower_base);
|
||||||
|
|
||||||
|
|
||||||
BigInt value = {};
|
BigInt value = {};
|
||||||
big_int_shl(&value, &one, &shift_amount);
|
big_int_shl(&value, &one, &shift_amount);
|
||||||
|
|||||||
Reference in New Issue
Block a user