Skip to content

Commit

Permalink
Fix for CPG using idx and not IDX
Browse files Browse the repository at this point in the history
  • Loading branch information
DerelictDrone committed Dec 4, 2023
1 parent 9ee8d65 commit 6cb16a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/wire/zvm/zvm_opcodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ ZVM.OpcodeTable[28] = function(self) --SPG
self:Dyn_Emit("end")
end
ZVM.OpcodeTable[29] = function(self) --CPG
self:Dyn_Emit("$L idx = math.floor($1 / 128)")
self:Dyn_Emit("$L IDX = math.floor($1 / 128)")
self:Dyn_Emit("$L PAGE = VM:GetPageByIndex(IDX)")
self:Dyn_EmitInterruptCheck()

self:Dyn_Emit("if VM.CurrentPage.RunLevel <= VM.Page[idx].RunLevel then")
self:Dyn_Emit("if VM.CurrentPage.RunLevel <= VM.Page[IDX].RunLevel then")
self:Dyn_Emit("PAGE.Read = 1")
self:Dyn_Emit("PAGE.Write = 1")
self:Dyn_Emit("VM:SetPageByIndex(IDX)")
Expand Down

0 comments on commit 6cb16a0

Please sign in to comment.