[pseudo] fix an out-of-bound error in LRTable.

Fix window debug build.
This commit is contained in:
Haojian Wu 2022-02-23 21:34:20 +01:00
parent 2a6dbedf5a
commit 302ca279cb
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ llvm::ArrayRef<LRTable::Action> LRTable::find(StateID Src, SymbolID ID) const {
size_t Start = It - States.data(), End = Start;
while (End < States.size() && States[End] == Src)
++End;
return llvm::makeArrayRef(&Actions[Start], &Actions[End]);
return llvm::makeArrayRef(&Actions[Start], End - Start);
}
} // namespace pseudo