From cf3b908ca7917e5f7c6fee39b2660b1a47dc9425 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 14 Oct 2020 11:59:16 +0100 Subject: [PATCH] Compute correct value for limit --- libs/remix-debug/src/solidity-decoder/types/ArrayType.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-debug/src/solidity-decoder/types/ArrayType.js b/libs/remix-debug/src/solidity-decoder/types/ArrayType.js index ac10d9e949..d21ec1b015 100644 --- a/libs/remix-debug/src/solidity-decoder/types/ArrayType.js +++ b/libs/remix-debug/src/solidity-decoder/types/ArrayType.js @@ -86,10 +86,10 @@ class ArrayType extends RefType { type: this.typeName } } - let limit = length if (!skip) skip = 0 if (skip) offset = offset + (32 * skip) - if ((length - skip) > 100) limit = 100 + let limit = length - skip + if (limit > 100) limit = 100 for (var k = 0; k < limit; k++) { var contentOffset = offset ret.push(this.underlyingType.decodeFromMemory(contentOffset, memory))