Merge pull request #39 from DODOEX/fix-dodomath-precision

fix-dodomath-precision
This commit is contained in:
Attens_X
2024-01-17 09:45:04 +08:00
committed by GitHub

View File

@@ -187,6 +187,9 @@ library DODOMath {
uint256 numerator;
if (bSig) {
numerator = squareRoot.sub(bAbs);
if (numerator == 0) {
revert("DODOMath: should not be zero");
}
} else {
numerator = bAbs.add(squareRoot);
}