1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-04-16 20:40:16 +00:00

Fix FileCheck crash when fuzzy scanning starting at the end of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-11-29 08:30:24 +00:00
parent cd188e9665
commit a76a7883b5

@ -398,7 +398,7 @@ void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
}
}
if (BestQuality < 50) {
if (Best != StringRef::npos && BestQuality < 50) {
// Print the "possible intended match here" line if we found something
// reasonable.
SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best),