fix input param for ctor

pull/3094/head
yann300 7 years ago
parent 31777f1289
commit 460e04d3f5
  1. 13
      remix-solidity/src/decoder/internalCallTree.js

@ -271,11 +271,14 @@ function extractFunctionDefinitions (ast, astWalker) {
function addParams (parameterList, tree, scopeId, states, contractName, sourceLocation, stackLength, stackPosition, dir) { function addParams (parameterList, tree, scopeId, states, contractName, sourceLocation, stackLength, stackPosition, dir) {
for (var inputParam in parameterList.children) { for (var inputParam in parameterList.children) {
var param = parameterList.children[inputParam] var param = parameterList.children[inputParam]
tree.scopes[scopeId].locals[param.attributes.name] = { var stackDepth = stackLength + (dir * stackPosition)
name: param.attributes.name, if (stackDepth >= 0) {
type: decodeInfo.parseType(param.attributes.type, states, contractName), tree.scopes[scopeId].locals[param.attributes.name] = {
stackDepth: stackLength + (dir * stackPosition), name: param.attributes.name,
sourceLocation: sourceLocation type: decodeInfo.parseType(param.attributes.type, states, contractName),
stackDepth: stackDepth,
sourceLocation: sourceLocation
}
} }
stackPosition += dir stackPosition += dir
} }

Loading…
Cancel
Save