From 8b5fa7f23c82999ff8cf34731f053e7e58766643 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 29 Sep 2014 09:50:16 +0200 Subject: fixed #591 fully copy local variables for sprite duplicates and (Scratch-like) clones --- threads.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 37f8613..2b2c1f6 100644 --- a/threads.js +++ b/threads.js @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2014-September-18'; +modules.threads = '2014-September-29'; var ThreadManager; var Process; @@ -2973,8 +2973,11 @@ VariableFrame.prototype.toString = function () { }; VariableFrame.prototype.copy = function () { - var frame = new VariableFrame(this.parentFrame); - frame.vars = copy(this.vars); + var frame = new VariableFrame(this.parentFrame), + myself = this; + this.names().forEach(function (vName) { + frame.addVar(vName, myself.getVar(vName)); + }); return frame; }; -- cgit v1.3.1