From 4df3e39def6b7bebcedf617dd9d5e49d28abc5f4 Mon Sep 17 00:00:00 2001 From: OisinKyne Date: Fri, 29 Dec 2017 14:23:30 +0000 Subject: [PATCH] Why are the checks in safe divide commented out? I know the rest of this file doesn't use the divide method but it would be awful easy to forget and I don't see why they should be commented out. --- MainSale.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MainSale.sol b/MainSale.sol index 74065f4..753b562 100644 --- a/MainSale.sol +++ b/MainSale.sol @@ -12,9 +12,9 @@ library SafeMath { } function div(uint256 a, uint256 b) internal constant returns (uint256) { - // assert(b > 0); // Solidity automatically throws when dividing by 0 + assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold + assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }