From 78db7cf79317a29d13451bee9416e19427b6d13e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 15 Oct 2019 16:54:54 +0530 Subject: [PATCH] comments --- .../modules/forLoopIteratesOverDynamicArray.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.js b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.js index 433fd57418..b2a514521d 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.js +++ b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.js @@ -8,8 +8,8 @@ function forLoopIteratesOverDynamicArray () { } forLoopIteratesOverDynamicArray.prototype.visit = function (node) { - if (common.isForLoop(node) && - (common.isDynamicArrayLengthAccess(node.children[1].children[1]) || // condition uses dynamic array length like `i < array.length` + if (common.isForLoop(node) && // is for loop node + (common.isDynamicArrayLengthAccess(node.children[1].children[1]) || // check if for loop condition uses dynamic array length like `i < array.length` (node.children[1].children[1].children && common.isDynamicArrayLengthAccess(node.children[1].children[1].children[0]))) // or like `i < array.length (operator like -,+,*,/) number` e.g; i < array.length -1 ) { this.relevantNodes.push(node)