Compute correct value for limit

pull/479/head
ioedeveloper 4 years ago
parent 3a908a019e
commit 3fc7f36006
  1. 4
      libs/remix-debug/src/solidity-decoder/types/ArrayType.js

@ -86,10 +86,10 @@ class ArrayType extends RefType {
type: this.typeName type: this.typeName
} }
} }
let limit = length
if (!skip) skip = 0 if (!skip) skip = 0
if (skip) offset = offset + (32 * skip) 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++) { for (var k = 0; k < limit; k++) {
var contentOffset = offset var contentOffset = offset
ret.push(this.underlyingType.decodeFromMemory(contentOffset, memory)) ret.push(this.underlyingType.decodeFromMemory(contentOffset, memory))

Loading…
Cancel
Save