diff --git a/src/WattleScript.Interpreter/Execution/VM/Instruction.cs b/src/WattleScript.Interpreter/Execution/VM/Instruction.cs index 056ac5d7..cd839fbc 100644 --- a/src/WattleScript.Interpreter/Execution/VM/Instruction.cs +++ b/src/WattleScript.Interpreter/Execution/VM/Instruction.cs @@ -19,7 +19,7 @@ internal struct Instruction //32 bits public int NumVal { - get => (int) (_data >> 7); + get => (int) ((_data >> 7) & 0xFFFFFFFF); set => _data = (_data & ~0x7fffffff80UL) | ((ulong) (uint) value) << 7; }