diff gen/linker.cpp @ 863:6c850977a941

modified gen/linker.cpp to only append .exe suffix on windows if not already present
author elrood
date Thu, 18 Dec 2008 19:24:33 +0100
parents 855e0ef78fa2
children 5a03f3f74615
line wrap: on
line diff
--- a/gen/linker.cpp	Thu Dec 18 19:21:44 2008 +0100
+++ b/gen/linker.cpp	Thu Dec 18 19:24:33 2008 +0100
@@ -72,7 +72,7 @@
         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 @@
         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");