mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-20 16:41:29 +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"); \
|
wasm_set_exception(module, "instruction limit exceeded"); \
|
||||||
goto got_exception; \
|
goto got_exception; \
|
||||||
} \
|
} \
|
||||||
if (instructions_left > 0) \
|
else if (instructions_left > 0) \
|
||||||
instructions_left--;
|
instructions_left--;
|
||||||
#else
|
#else
|
||||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||||
|
|
|
@ -107,7 +107,7 @@ typedef float64 CellType_F64;
|
||||||
wasm_set_exception(module, "instruction limit exceeded"); \
|
wasm_set_exception(module, "instruction limit exceeded"); \
|
||||||
goto got_exception; \
|
goto got_exception; \
|
||||||
} \
|
} \
|
||||||
if (instructions_left > 0) \
|
else if (instructions_left > 0) \
|
||||||
instructions_left--;
|
instructions_left--;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user