From: fennecdjay Date: Mon, 14 Oct 2019 23:35:54 +0000 (+0200) Subject: :art: improve vm_code X-Git-Tag: nightly~2143 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=67006af4571d9d9dd256e11f35d0390ec5a94ec0;p=gwion.git :art: improve vm_code --- 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;