Skip to content

Commit 72541c9

Browse files
authored
Fix LEA instruction (#71)
The segment argument for the %d was in the string.gsub rather than string.format
1 parent 81b7aa5 commit 72541c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/wire/zvm/zvm_opcodes.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ end
11561156
ZVM.OpcodeTable[126] = function(self) --LEA
11571157
local emitText = self.OperandEffectiveAddress[self.EmitOperandRM[2]] or "0"
11581158
emitText = string.gsub(emitText,"$BYTE",self.EmitOperandByte[2] or "0")
1159-
emitText = string.format(string.gsub(emitText,"$SEG","VM[%q]",(self.EmitOperandSegment[2] or "DS")))
1159+
emitText = string.format(string.gsub(emitText,"$SEG","VM[%q]"), self.EmitOperandSegment[2] or "DS")
11601160
self:Dyn_EmitOperand(emitText)
11611161
end
11621162
ZVM.OpcodeTable[127] = function(self) --BLOCK

0 commit comments

Comments
 (0)