diff options
Diffstat (limited to 'src/tools/fuzzing.h')
-rw-r--r-- | src/tools/fuzzing.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index fe4a3955a..571dad79e 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -406,20 +406,14 @@ private: Index num = upTo(3); for (size_t i = 0; i < num; i++) { // Events should have void return type and at least one param type - Type type = pick(i32, i64, f32, f64); - std::string sig = std::string("v") + getSig(type); std::vector<Type> params; - params.push_back(type); Index numValues = upToSquared(MAX_PARAMS - 1); - for (Index i = 0; i < numValues; i++) { - type = pick(i32, i64, f32, f64); - sig += getSig(type); - params.push_back(type); + for (Index i = 0; i < numValues + 1; i++) { + params.push_back(pick(i32, i64, f32, f64)); } auto* event = builder.makeEvent(std::string("event$") + std::to_string(i), WASM_EVENT_ATTRIBUTE_EXCEPTION, - ensureFunctionType(sig, &wasm)->name, - std::move(params)); + Signature(Type(params), Type::none)); wasm.addEvent(event); } } |