diff --git a/wolvm/Stack.cs b/wolvm/Stack.cs index 8ec0c27..1b16483 100644 --- a/wolvm/Stack.cs +++ b/wolvm/Stack.cs @@ -93,7 +93,8 @@ public static Stack Parse(string stack_code) { while (current != '}') { - current = stack_code[++position]; + if (char.IsWhiteSpace(current) || current == '{') + current = stack_code[++position]; while (char.IsWhiteSpace(current)) //skip whitespaces { try diff --git a/wolvm/VirtualMachine.cs b/wolvm/VirtualMachine.cs index a91644e..04e5ca8 100644 --- a/wolvm/VirtualMachine.cs +++ b/wolvm/VirtualMachine.cs @@ -58,7 +58,7 @@ static void Main(string[] args) break; case "-test": test = true; - Run(new StreamReader(File.OpenRead(args[0])).ReadToEnd()); + Run(new StreamReader(File.OpenRead(args[1])).ReadToEnd()); break; default: Run(new StreamReader(File.OpenRead(args[0])).ReadToEnd());