Changeset 22028 for trunk/src/peldr/pe.c
- Timestamp:
- Oct 22, 2012, 2:48:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/peldr/pe.c
r22016 r22028 199 199 win32cmdline = pszTemp; 200 200 201 // add the .EXE extension if missing (only if there's no path) 202 if (*str_find_char(exeName, '.') == '\0' && 203 *str_find_char(exeName, '\\') == '\0' && 204 *str_find_char(exeName, '/') == '\0') 201 // add the .EXE extension if missing (only if there's no extension already) 202 if (*str_find_last_char(exeName, '.') == '\0') 205 203 { 206 204 int i = strlen(exeName); 207 if (i < 4 || !((exeName[i-1] == 'E' || exeName[i-1] == 'e') && 208 (exeName[i-2] == 'X' || exeName[i-2] == 'x') && 209 (exeName[i-3] == 'E' || exeName[i-3] == 'e') && 210 exeName[i-4] == '.')) 211 { 212 if (i + 4 < CCHMAXPATH) 213 strcat(exeName, ".exe"); 214 } 205 if (i + 4 < CCHMAXPATH) 206 strcat(exeName, ".exe"); 215 207 } 216 208
Note:
See TracChangeset
for help on using the changeset viewer.