From 7279ce75262ca21ff067f33573dfc8bfa6dd40b6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 19 Mar 2025 21:41:55 +0100 Subject: Support multi-active states in fuzzer. --- rtt-module.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rtt-module.js') diff --git a/rtt-module.js b/rtt-module.js index c10f25d..37a9ecc 100755 --- a/rtt-module.js +++ b/rtt-module.js @@ -81,6 +81,10 @@ module.exports.fuzz = function(fuzzerInputData) { // If multiple players can act, we'll pick a random player to go first. ctx.active = data.pickValue(roles) } + if (Array.isArray(ctx.active)) { + // If multiple players can act, we'll pick a random player to go first. + ctx.active = data.pickValue(ctx.active) + } const state_freeze = !NO_IMMUTABLE_VIEWSTATE ? JSON.stringify(ctx.state) : {} -- cgit v1.2.3