mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Added code to avoid checking for .bc when the filename is too short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad0bf0fc0c
commit
b5d09bf4cc
@ -44,7 +44,8 @@ GetFileNameRoot(const std::string &InputFilename)
|
||||
std::string IFN = InputFilename;
|
||||
std::string outputFilename;
|
||||
int Len = IFN.length();
|
||||
if (IFN[Len-3] == '.' && IFN[Len-2] == 'b' && IFN[Len-1] == 'c') {
|
||||
if ((Len > 2) &&
|
||||
IFN[Len-3] == '.' && IFN[Len-2] == 'b' && IFN[Len-1] == 'c') {
|
||||
outputFilename = std::string(IFN.begin(), IFN.end()-3); // s/.bc/.s/
|
||||
} else {
|
||||
outputFilename = IFN;
|
||||
|
Loading…
Reference in New Issue
Block a user