summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-01-04 10:08:15 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-01-04 10:08:15 +0100
commit033555b3e70903c048f94d5ed038cc299435a1f3 (patch)
treec9d4c5d6199ef29da5377bbb69e45fe72e76df70
parentfeedca5bfc7805ea4738700a8bceb56e591be2f0 (diff)
downloadfuzzer-033555b3e70903c048f94d5ed038cc299435a1f3.tar.gz
deal with object scenarios
-rwxr-xr-xrtt-module.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtt-module.js b/rtt-module.js
index 127507e..b1df281 100755
--- a/rtt-module.js
+++ b/rtt-module.js
@@ -28,7 +28,8 @@ module.exports.fuzz = function(fuzzerInputData) {
return
}
let seed = data.consumeIntegralInRange(1, 2**35-31)
- let scenario = data.pickValue(RULES.scenarios)
+ let scenarios = Array.isArray(RULES.scenarios) ? RULES.scenarios : Object.values(RULES.scenarios).flat()
+ let scenario = data.pickValue(scenarios)
// TODO randomize options
const options = {}