From e07381c4a8a138fea27b8a8a82049c9bd2628ebc Mon Sep 17 00:00:00 2001 From: yzha107 <62412615+yzha107@users.noreply.github.com> Date: Fri, 20 Mar 2020 13:28:18 +0800 Subject: [PATCH] Fix a WASM_OP_SET_LOCAL type check issue (#205) --- core/iwasm/interpreter/wasm_interp_fast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/iwasm/interpreter/wasm_interp_fast.c b/core/iwasm/interpreter/wasm_interp_fast.c index 557d7bfa5..480c64b35 100644 --- a/core/iwasm/interpreter/wasm_interp_fast.c +++ b/core/iwasm/interpreter/wasm_interp_fast.c @@ -2072,8 +2072,8 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, || local_type == VALUE_TYPE_F32) { *(int32*)(frame_lp + local_offset) = frame_lp[addr1]; } - else if (local_type == VALUE_TYPE_I32 - || local_type == VALUE_TYPE_F32) { + else if (local_type == VALUE_TYPE_I64 + || local_type == VALUE_TYPE_F64) { PUT_I64_TO_ADDR((uint32*)(frame_lp + local_offset), GET_I64_FROM_ADDR(frame_lp + addr1)); }