From e9b775afb64b435ce46aa89753056293aac380f3 Mon Sep 17 00:00:00 2001 From: Stan Goldin <48094744+Lomet@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:09:25 +0200 Subject: [PATCH] fix overflow (#164) --- contracts/LockedControl.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/LockedControl.sol b/contracts/LockedControl.sol index c02fe69..e3c6def 100644 --- a/contracts/LockedControl.sol +++ b/contracts/LockedControl.sol @@ -112,7 +112,7 @@ contract LockedControl is LockedPoolz{ function getArraySum(uint256[] calldata _array) internal pure returns(uint256) { uint256 sum = 0; for(uint i=0 ; i<_array.length ; i++){ - sum = sum + _array[i]; + sum = SafeMath.add(sum ,_array[i]); } return sum; }