diff --git a/src/common/cmdline.c b/src/common/cmdline.c index 4de79a419..6b24a75fb 100644 --- a/src/common/cmdline.c +++ b/src/common/cmdline.c @@ -181,6 +181,17 @@ void InitCmdLine (int* aArgCount, char*** aArgVec, const char* aProgName) /* Use the default */ ProgName = aProgName; } + else { + /* remove .exe extension, if there is any + ** + ** Note: This creates a new string that is + ** never free()d. + ** As this is exactly only string, and it + ** lives for the whole lifetime of the tool, + ** this is not an issue. + */ + ProgName = MakeFilename (ProgName, ""); + } } /* Make a CmdLine struct */