8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e35fd19 commit 7f160cfCopy full SHA for 7f160cf
Assets/Patterns/10. Bytecode/Scripts/VM.cs
@@ -47,13 +47,14 @@ public void Interpret(int[] bytecode)
47
}
48
case Instruction.INST_LITERAL:
49
{
50
- //Important that this i++ is not inside bytecode[i++] or it will not jump to next i
51
- i++;
52
-
53
- int value = bytecode[i];
54
55
- Push(value);
+ ////Important that this i++ is not inside bytecode[i++] or it will not jump to next i
+ //i++;
+ //int value = bytecode[i];
+ //Push(value);
56
+ //this can be a oneliner
+ //in this case bytecode will use i+1 bytecode element
57
+ Push(bytecode[++i]);
58
break;
59
60
case Instruction.INST_GET_HEALTH:
0 commit comments