From 4c3d23ddfee3de1ac5600aca118557f872088f70 Mon Sep 17 00:00:00 2001 From: elrood Date: Thu, 18 Dec 2008 19:24:33 +0100 Subject: [PATCH] modified gen/linker.cpp to only append .exe suffix on windows if not already present --- gen/linker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/linker.cpp b/gen/linker.cpp index 1ad2d0bf5e..778b87b66e 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -72,7 +72,7 @@ int linkExecutable(const char* argv0) else exestr = "a.out"; } - if (global.params.os == OSWindows) + if (global.params.os == OSWindows && !(exestr.substr(exestr.length()-4) == ".exe")) exestr.append(".exe"); std::string outopt = "-o=" + exestr; @@ -240,7 +240,7 @@ int linkObjToExecutable(const char* argv0) else exestr = "a.out"; } - if (global.params.os == OSWindows) + if (global.params.os == OSWindows && !(exestr.rfind(".exe") == exestr.length()-4)) exestr.append(".exe"); args.push_back("-o");