fix input param for ctor

pull/7/head
yann300 7 years ago
parent dbbaad367a
commit 3a19731868
  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) {
for (var inputParam in parameterList.children) {
var param = parameterList.children[inputParam]
tree.scopes[scopeId].locals[param.attributes.name] = {
name: param.attributes.name,
type: decodeInfo.parseType(param.attributes.type, states, contractName),
stackDepth: stackLength + (dir * stackPosition),
sourceLocation: sourceLocation
var stackDepth = stackLength + (dir * stackPosition)
if (stackDepth >= 0) {
tree.scopes[scopeId].locals[param.attributes.name] = {
name: param.attributes.name,
type: decodeInfo.parseType(param.attributes.type, states, contractName),
stackDepth: stackDepth,
sourceLocation: sourceLocation
}
}
stackPosition += dir
}

Loading…
Cancel
Save