Skip to content

Commit

Permalink
Failed assertion inside divuu function fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
3sGgpQ8H committed Feb 16, 2023
1 parent 9e69beb commit 5e1e7c1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ABDKMath64x64.sol
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,7 @@ library ABDKMath64x64 {
if (xl < lo) xh -= 1;
xl -= lo; // We rely on overflow behavior here

assert (xh == hi >> 128);

result += xl / y;
result += xh == hi >> 128 ? xl / y : 1;
}

require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
Expand Down

0 comments on commit 5e1e7c1

Please sign in to comment.