fix: update instruction limit checks to use else if for improved clarity

This commit is contained in:
Alix ANNERAUD 2025-03-18 20:18:53 +01:00
parent e1b0411cff
commit cb5975e168
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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