Skip to content

Commit

Permalink
[C++] Fix bug in ParserATNSimulator
Browse files Browse the repository at this point in the history
  • Loading branch information
jcking committed Apr 11, 2022
1 parent 2095446 commit d31cb74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp
Expand Up @@ -714,7 +714,7 @@ std::vector<dfa::DFAState::PredPrediction> ParserATNSimulator::getPredicatePredi
}) != altToPred.end();
std::vector<dfa::DFAState::PredPrediction> pairs;
if (containsPredicate) {
for (size_t i = 0; i < altToPred.size(); i++) {
for (size_t i = 1; i < altToPred.size(); i++) {
const auto &pred = altToPred[i];
assert(pred != nullptr); // unpredicted is indicated by SemanticContext.NONE
if (ambigAlts.test(i)) {
Expand Down

0 comments on commit d31cb74

Please sign in to comment.