fix-dodomath-precision

This commit is contained in:
Skye
2024-01-14 23:59:15 +08:00
parent e44c328fb0
commit 10a496dd3b

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);
}