Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Mar 14, 2024
1 parent bbc4a99 commit 2a2debc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/gadgets/range-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function rangeCheck16(x: Field) {
return;
}
// check that x fits in 16 bits
x.rangeCheckHelper(16).assertEquals(x);
rangeCheckHelper(16, x).assertEquals(x);
}

function rangeCheck8(x: Field) {
Expand All @@ -329,8 +329,8 @@ function rangeCheck8(x: Field) {
}

// check that x fits in 16 bits
x.rangeCheckHelper(16).assertEquals(x);
rangeCheckHelper(16, x).assertEquals(x);
// check that 2^8 x fits in 16 bits
let x256 = x.mul(1 << 8).seal();
x256.rangeCheckHelper(16).assertEquals(x256);
rangeCheckHelper(16, x256).assertEquals(x256);
}

0 comments on commit 2a2debc

Please sign in to comment.