Fix a bug where we would attempt to execute c:\autoexec.bat, which is a bad thing

git-svn-id: svn://10.0.0.236/trunk@2974 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blythe
1998-06-03 00:23:00 +00:00
parent 8d6d952a29
commit ad8817f5b7
2 changed files with 18 additions and 20 deletions

View File

@@ -2219,7 +2219,15 @@ BOOL FEU_FindExecutable(const char *pFileName, char *pExecutable, BOOL bIdentity
// pFileName may not be a file name, but an extension.
// We want to support just extensions for ease, so check on it.
if(bExtension && pFileName) {
// We have an extension.
// Do we need to add a period?
char aExt[_MAX_EXT];
if(*pFileName != '.') {
aExt[0] = '.';
aExt[1] = '\0';
strcat(aExt, pFileName);
pFileName = aExt;
}
// Fill out the rest of the name.
bFreeFileName = TRUE;
pFileName = (const char *)WH_TempFileName(xpTemporary, "G", pFileName);