mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-20 08:31:20 +00:00
fix: update instruction limit checks to use else if for improved clarity
This commit is contained in:
parent
e1b0411cff
commit
cb5975e168
|
@ -1574,7 +1574,7 @@ get_global_addr(uint8 *global_data, WASMGlobalInstance *global)
|
|||
wasm_set_exception(module, "instruction limit exceeded"); \
|
||||
goto got_exception; \
|
||||
} \
|
||||
if (instructions_left > 0) \
|
||||
else if (instructions_left > 0) \
|
||||
instructions_left--;
|
||||
#else
|
||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||
|
|
|
@ -107,7 +107,7 @@ typedef float64 CellType_F64;
|
|||
wasm_set_exception(module, "instruction limit exceeded"); \
|
||||
goto got_exception; \
|
||||
} \
|
||||
if (instructions_left > 0) \
|
||||
else if (instructions_left > 0) \
|
||||
instructions_left--;
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue
Block a user