set <n> for the name if anonymous

pull/7/head
yann300 8 years ago
parent cccfc472bf
commit d9670e9f0d
  1. 8
      src/solidity/localDecoder.js

@ -8,10 +8,16 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory, storage)
}
var locals = {}
memory = formatMemory(memory)
var anonymousIncr = 1
for (var local in scope.locals) {
let variable = scope.locals[local]
if (variable.stackDepth < stack.length) {
locals[variable.name] = variable.type.decodeFromStack(variable.stackDepth, stack, memory, storage)
var name = variable.name
if (name === '') {
name = '<' + anonymousIncr + '>'
anonymousIncr++
}
locals[name] = variable.type.decodeFromStack(variable.stackDepth, stack, memory, storage)
}
}
return locals

Loading…
Cancel
Save