mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 22:34:39 +00:00
fix a crash on "lli ex" or any other file whose name is exactly two
characters long. llvm-svn: 101336
This commit is contained in:
parent
32747b3841
commit
f827b4be59
@ -192,7 +192,8 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
} else {
|
||||
// Otherwise, if there is a .bc suffix on the executable strip it off, it
|
||||
// might confuse the program.
|
||||
if (InputFile.rfind(".bc") == InputFile.length() - 3)
|
||||
if (InputFile.size() > 3 &&
|
||||
InputFile.rfind(".bc") == InputFile.length() - 3)
|
||||
InputFile.erase(InputFile.length() - 3);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user