From e661e596fc86563ffc3014b2eb9957c71f53596a Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Mon, 6 Apr 2026 11:29:03 +0200 Subject: [PATCH] fix(instruction-metering): correct condition checks in wasm_runtime_resume_wasm function --- core/iwasm/common/wasm_runtime_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index 9102470b8..4b879e10d 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -2480,15 +2480,15 @@ wasm_runtime_resume_wasm(WASMExecEnv *exec_env) return false; } - if (!exec_env->metering_suspended - || !exec_env->metering_suspend_function + if (!exec_env->metering_suspended || !exec_env->metering_suspend_function || !exec_env->metering_suspend_argv) { wasm_runtime_set_exception(exec_env->module_inst, "no metering resume is pending"); return false; } - function = (WASMFunctionInstanceCommon *)exec_env->metering_suspend_function; + function = + (WASMFunctionInstanceCommon *)exec_env->metering_suspend_function; return wasm_runtime_call_wasm(exec_env, function, exec_env->metering_suspend_argc, exec_env->metering_suspend_argv);