Commit ad69f711 authored by Neil Fraser's avatar Neil Fraser

Merge pull request #68 from Gamefroot/fix-procedure-call

Fixed issue with mutated procedure call blocks
parents d609675c 4a5f0a0b
...@@ -594,15 +594,15 @@ Blockly.Blocks['procedures_callnoreturn'] = { ...@@ -594,15 +594,15 @@ Blockly.Blocks['procedures_callnoreturn'] = {
// Initialize caller with the mutator's IDs. // Initialize caller with the mutator's IDs.
this.setProcedureParameters(def.arguments_, def.paramIds_); this.setProcedureParameters(def.arguments_, def.paramIds_);
} else { } else {
this.arguments_ = []; var args = [];
for (var i = 0, childNode; childNode = xmlElement.childNodes[i]; i++) { for (var i = 0, childNode; childNode = xmlElement.childNodes[i]; i++) {
if (childNode.nodeName.toLowerCase() == 'arg') { if (childNode.nodeName.toLowerCase() == 'arg') {
this.arguments_.push(childNode.getAttribute('name')); args.push(childNode.getAttribute('name'));
} }
} }
// For the second argument (paramIds) use the arguments list as a dummy // For the second argument (paramIds) use the arguments list as a dummy
// list. // list.
this.setProcedureParameters(this.arguments_, this.arguments_); this.setProcedureParameters(args, args);
} }
}, },
/** /**
......
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