diff --git a/src/jug.sol b/src/jug.sol index 44a6d22a..d055fa44 100644 --- a/src/jug.sol +++ b/src/jug.sol @@ -53,7 +53,9 @@ contract Jug is DSNote { x := div(xxRound, b) if mod(n,2) { let zx := mul(z, x) - if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0,0) } + if iszero(iszero(x)) { + if iszero(eq(div(zx, x), z)) { revert(0,0) } + } let zxRound := add(zx, half) if lt(zxRound, zx) { revert(0,0) } z := div(zxRound, b) diff --git a/src/pot.sol b/src/pot.sol index e8c31016..88b30c9b 100644 --- a/src/pot.sol +++ b/src/pot.sol @@ -91,7 +91,9 @@ contract Pot is DSNote { x := div(xxRound, base) if mod(n,2) { let zx := mul(z, x) - if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0,0) } + if iszero(iszero(x)) { + if iszero(eq(div(zx, x), z)) { revert(0,0) } + } let zxRound := add(zx, half) if lt(zxRound, zx) { revert(0,0) } z := div(zxRound, base)