Skip to content

Commit 37db438

Browse files
authored
fix: correctly call stream toggle in wasm binding (#71)
1 parent 3d62506 commit 37db438

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ecsact/wasm/detail/wasm_ecsact_system_execution.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,13 @@ wasm_trap_t* wasm_ecsact_system_execution_context_stream_toggle(
300300
auto ctx = get_execution_context(args->data[0]);
301301
auto memory = get_execution_context_memory(args->data[0]);
302302

303-
ecsact_system_execution_context_add(
303+
assert(args->data[2].kind == WASM_I32);
304+
305+
ecsact_system_execution_context_stream_toggle(
304306
ctx,
305-
ecsact_id_from_wasm_i32<ecsact_component_like_id>(args->data[1]),
306-
get_const_void_ptr(args->data[2], memory)
307+
ecsact_id_from_wasm_i32<ecsact_component_id>(args->data[1]),
308+
static_cast<bool>(args->data[2].of.i32),
309+
get_const_void_ptr(args->data[2], memory) // indexed field values
307310
);
308311

309312
return nullptr;

0 commit comments

Comments
 (0)