Commit 3a197318 authored by yann300's avatar yann300

fix input param for ctor

parent dbbaad36
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment