Skip to content

Commit

Permalink
Increase size of continuation PC
Browse files Browse the repository at this point in the history
  • Loading branch information
arnodel committed Dec 15, 2024
1 parent 38aca5e commit 2bac12a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/luacont.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type LuaCont struct {
*Closure
registers []Value
cells []Cell
pc int16
pc int32
acc []Value
running bool
borrowedCells bool
Expand Down Expand Up @@ -358,12 +358,12 @@ RunLoop:
case code.Type5Pfx:
switch opcode.GetJ() {
case code.OpJump:
pc += int16(opcode.GetOffset())
pc += int32(opcode.GetOffset())
continue RunLoop
case code.OpJumpIf:
test := Truth(getReg(regs, cells, opcode.GetA()))
if test == opcode.GetF() {
pc += int16(opcode.GetOffset())
pc += int32(opcode.GetOffset())
} else {
pc++
}
Expand Down

0 comments on commit 2bac12a

Please sign in to comment.