Skip to content

Commit

Permalink
Fix felt_shr shifting to the left instead of right (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchatruc authored Sep 18, 2023
1 parent 5871d4a commit 975ffcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lambdaworks/lib/lambdaworks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub unsafe extern "C" fn free_string(ptr: *mut c_char) {
pub extern "C" fn felt_shr(a: Limbs, b: usize, result: Limbs) {
let felt_a = limbs_to_felt(a).representative();

let res = felt_a << b;
let res = felt_a >> b;

felt_to_limbs(Felt::from(&res), result)
}
Expand Down

0 comments on commit 975ffcf

Please sign in to comment.