From c73fc90033b3c7c3689faa5fdfc45ebbe93072c0 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 30 Sep 2021 14:04:59 +0200 Subject: [PATCH] restricted inter-scene messages to text and numbers --- HISTORY.md | 1 + src/threads.js | 1 + 2 files changed, 2 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 0c7e2033..b7899c50 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -38,6 +38,7 @@ ### 2021-09-30 * blocks, objects, threads, gui: optional upvars referencing event data for message, key and scene hat blocks * blocks: disabled dropping reporters onto message hat block input slots +* threads: restricted inter-scene messages to text and numbers ### 2021-09-29 * objects, blocks: refactored experimental "When I receive message" hat block diff --git a/src/threads.js b/src/threads.js index 7bcbda20..55b5d451 100644 --- a/src/threads.js +++ b/src/threads.js @@ -4730,6 +4730,7 @@ Process.prototype.doSwitchToScene = function (id, transmission) { message = transmission.at(1), ide, scenes, num, scene; this.assertAlive(rcvr); + this.assertType(message, ['text', 'number']); if (this.readyToTerminate || this.topBlock.selector === 'receiveOnScene') { // let the user press "stop" or "esc", // prevent "when this scene starts" hat blocks from directly