From 9884d4b14e86ced04fa9ffb373c783c2111f03d9 Mon Sep 17 00:00:00 2001 From: WallopingEwe <53689141+WallopingEwe@users.noreply.github.com> Date: Fri, 21 Mar 2025 02:40:10 -0500 Subject: [PATCH] Fix LEA instruction The segment argument for the %d was in the string.gsub rather than string.format --- lua/wire/zvm/zvm_opcodes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wire/zvm/zvm_opcodes.lua b/lua/wire/zvm/zvm_opcodes.lua index feea9ff..939c03c 100644 --- a/lua/wire/zvm/zvm_opcodes.lua +++ b/lua/wire/zvm/zvm_opcodes.lua @@ -1156,7 +1156,7 @@ end ZVM.OpcodeTable[126] = function(self) --LEA local emitText = self.OperandEffectiveAddress[self.EmitOperandRM[2]] or "0" emitText = string.gsub(emitText,"$BYTE",self.EmitOperandByte[2] or "0") - emitText = string.format(string.gsub(emitText,"$SEG","VM[%q]",(self.EmitOperandSegment[2] or "DS"))) + emitText = string.format(string.gsub(emitText,"$SEG","VM[%q]"), self.EmitOperandSegment[2] or "DS") self:Dyn_EmitOperand(emitText) end ZVM.OpcodeTable[127] = function(self) --BLOCK