DBG: fix an out of bounds access on expression "([esp])"
This commit is contained in:
parent
fa902f5df7
commit
3f754c0bfc
|
@ -425,10 +425,10 @@ void ExpressionParser::shuntingYard()
|
|||
break;
|
||||
queue.push_back(curToken);
|
||||
}
|
||||
const auto & top = stack[stack.size() - 1];
|
||||
if(!stack.empty() && top.type() == Token::Type::Function) //If the token at the top of the stack is a function token, pop it onto the output queue.
|
||||
auto size = stack.size();
|
||||
if(size && stack[size - 1].type() == Token::Type::Function) //If the token at the top of the stack is a function token, pop it onto the output queue.
|
||||
{
|
||||
queue.push_back(top);
|
||||
queue.push_back(stack[size - 1]);
|
||||
stack.pop_back();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue