title: Solidity function with arrays gives overflow error
body: <p>I have the same code without an array and it just works.
  But In this one if i enter amount anything more than 0.001 ether it gives an overflow error.
  I tried Other functions called in this one with errored values and they don't give an error.</p>
  <p>CheckPairValue() and CheckSellPrice() works.</p>
  <p>Code is to check my Wallet's worth in pancakeswap</p>
  <p>Idk what's wrong.
  Any help is appretiated.</p>
  <p>Also Contract is verified on bscscan.
  <a href="https://www.bscscan.com/address/0xbd29c833bf3a5186df62abbcdb8542f6066a3d8f#code" rel="nofollow noreferrer">Contract</a></p>
  <pre><code>function GetSellValue(address[] memory TokenAddress, uint[] memory Amount)public view returns(uint256[] memory){
          uint[] memory Value = new uint[](TokenAddress.length);
          for(uint i = 0; i &lt; TokenAddress.length; i++){
              address Pair = CheckPairValue(TokenAddress[i], Amount[i] * 2);
              address[] memory path;
              if(Pair != PairAddresses[0]){
                  path = new address[](3);
                  path[0] = TokenAddress[i];
                  path[1] = Pair;
                  path[2] = PairAddresses[0];
              }
              else
              {
                  path = new address[](2);
                  path[0] = TokenAddress[i];
                  path[1] = PairAddresses[0];
              }
              Value[i] = CheckSellPrice(Amount[i],path);
          }
          return Value;
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/UxgUi.png" rel="nofollow noreferrer">0.001 ether input works , anything higher doesn't</a></p>