We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e35fd19 + 7f160cf commit 16fa33bCopy full SHA for 16fa33b
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