summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2009-11-21 16:46:17 +0000
committerSimon Howard2009-11-21 16:46:17 +0000
commit3d577f70fb8a41a6609db76bdabae30f064a95bc (patch)
tree87729f7db6c8689d55d9c0386075aa99143cba1c
parentafa0c4c7979c1508605d0e79487f299cd03adda6 (diff)
downloadchocolate-doom-3d577f70fb8a41a6609db76bdabae30f064a95bc.tar.gz
chocolate-doom-3d577f70fb8a41a6609db76bdabae30f064a95bc.tar.bz2
chocolate-doom-3d577f70fb8a41a6609db76bdabae30f064a95bc.zip
Fix launch of game from setup tool.
Subversion-branch: /branches/raven-branch Subversion-revision: 1738
-rw-r--r--src/setup/mode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/setup/mode.c b/src/setup/mode.c
index ea90c76f..702db67d 100644
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -162,16 +162,18 @@ void InitBindings(void)
static void SetExecutable(mission_config_t *config)
{
+ char *extension;
+
free(executable);
#ifdef _WIN32
- executable = malloc(strlen(config->executable) + 5);
- sprintf(executable, "%s.exe", config->executable);
+ extension = ".exe";
#else
- executable = malloc(strlen(INSTALL_DIR) + strlen(config->executable) + 2);
- sprintf(executable, "%s%c%s", INSTALL_DIR, DIR_SEPARATOR,
- config->executable);
+ extension = "";
#endif
+
+ executable = malloc(strlen(config->executable) + 5);
+ sprintf(executable, "%s%s", config->executable, extension);
}
static void SetMission(mission_config_t *config)