Commit 79b9ef15 authored by twanvl's avatar twanvl

fixed infinite loop in parser

parent 71cee587
...@@ -547,7 +547,7 @@ void parseOper(TokenIterator& input, Script& script, Precedence minPrec, Instruc ...@@ -547,7 +547,7 @@ void parseOper(TokenIterator& input, Script& script, Precedence minPrec, Instruc
// function call, read arguments // function call, read arguments
vector<int> arguments; vector<int> arguments;
Token t = input.peek(); Token t = input.peek();
while (t != _(")")) { while (t != _(")") && t != TOK_EOF) {
if (input.peek(2) == _(":")) { if (input.peek(2) == _(":")) {
// name: ... // name: ...
arguments.push_back(string_to_variable(t.value)); arguments.push_back(string_to_variable(t.value));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment