mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
ir: move bounds checking to debug builds
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
@@ -23,6 +23,7 @@ emit_instruction (bal_engine_t *engine,
|
||||
return BAL_ENGINE_STATE_INVALID;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool is_greater_than_instructions_array
|
||||
= (engine->instruction_count >= engine->instructions_size);
|
||||
|
||||
@@ -35,6 +36,7 @@ emit_instruction (bal_engine_t *engine,
|
||||
engine->status = BAL_ERROR_INSTRUCTION_OVERFLOW;
|
||||
return engine->status;
|
||||
}
|
||||
#endif
|
||||
|
||||
bal_instruction_t opcode_bits = (BAL_OPCODE_SIZE - 1U) & opcode;
|
||||
bal_instruction_t source1_bits
|
||||
|
||||
Reference in New Issue
Block a user