From 67006af4571d9d9dd256e11f35d0390ec5a94ec0 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 15 Oct 2019 01:35:54 +0200 Subject: [PATCH] :art: improve vm_code --- src/vm/vm_code.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vm/vm_code.c b/src/vm/vm_code.c index c9c008e6..0fb3546d 100644 --- a/src/vm/vm_code.c +++ b/src/vm/vm_code.c @@ -56,8 +56,10 @@ ANN static m_bit* tobytecode(MemPool p, const VM_Code code) { if(instr->opcode < eGack) memcpy(ptr + i*BYTECODE_SZ, instr, BYTECODE_SZ); else { - if(instr->execute == NoOp) + if(instr->execute == NoOp) { + memset(ptr + i*BYTECODE_SZ, 0, BYTECODE_SZ); continue; + } *(m_bit*)(ptr + (i*BYTECODE_SZ)) = instr->opcode; *(Instr*)(ptr + (i*BYTECODE_SZ) + SZ_INT) = instr; *(f_instr*)(ptr + (i*BYTECODE_SZ) + SZ_INT*2) = instr->execute; -- 2.43.0