Skip to content

Commit 5e1e7c1

Browse files
committed
Failed assertion inside divuu function fixed
1 parent 9e69beb commit 5e1e7c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ABDKMath64x64.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,7 @@ library ABDKMath64x64 {
707707
if (xl < lo) xh -= 1;
708708
xl -= lo; // We rely on overflow behavior here
709709

710-
assert (xh == hi >> 128);
711-
712-
result += xl / y;
710+
result += xh == hi >> 128 ? xl / y : 1;
713711
}
714712

715713
require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

0 commit comments

Comments
 (0)