Browse Source

Fixed a bug in treefy() that tried to access vector oq before making sure it's not empty

cl-refactor
Giacomo Tazzari 11 years ago
parent
commit
d5b57012bd
  1. 2
      libserpent/parser.cpp

2
libserpent/parser.cpp

@ -150,10 +150,10 @@ Node treefy(std::vector<Node> stream) {
else if (typ == RPAREN) {
std::vector<Node> args;
while (1) {
if (!oq.size()) err("Bracket without matching", tok.metadata);
if (toktype(oq.back()) == LPAREN) break;
args.push_back(oq.back());
oq.pop_back();
if (!oq.size()) err("Bracket without matching", tok.metadata);
}
oq.pop_back();
args.push_back(oq.back());

Loading…
Cancel
Save