Skip to content

Commit

Permalink
fixes to_u128 and to_i128 in the forked noir repo
Browse files Browse the repository at this point in the history
  • Loading branch information
brweisz committed Jul 1, 2024
1 parent bb3e128 commit 6c0c56f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acvm-repo/acir_field/src/field_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<F: PrimeField> AcirField for FieldElement<F> {
}

fn to_i128(self) -> i128 {
let is_negative = self.is_negative();
let is_negative = self.neg().num_bits() < self.num_bits();
let absolute_value = if is_negative { self.neg() } else { self };

let mut bytes = [0; 32];
Expand Down

0 comments on commit 6c0c56f

Please sign in to comment.