llvm.org GIT mirror llvm / 6484dd4
fix a crash on "lli ex" or any other file whose name is exactly two characters long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101336 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
191191 } else {
192192 // Otherwise, if there is a .bc suffix on the executable strip it off, it
193193 // might confuse the program.
194 if (InputFile.rfind(".bc") == InputFile.length() - 3)
194 if (InputFile.size() > 3 &&
195 InputFile.rfind(".bc") == InputFile.length() - 3)
195196 InputFile.erase(InputFile.length() - 3);
196197 }
197198