diff options
author | peter1138 <peter1138@openttd.org> | 2009-01-08 14:10:39 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2009-01-08 14:10:39 +0000 |
commit | 2ef54545c72fb7e0052a55882067885a1a610bc8 (patch) | |
tree | f3c4b4bc77b42dbf215355d8004ac5882d1808ea /src | |
parent | 4df86694a73cf97313e9267e66dab55cc765ec72 (diff) | |
download | openttd-2ef54545c72fb7e0052a55882067885a1a610bc8.tar.xz |
(svn r14911) -Fix (r14909): -D did not work
Diffstat (limited to 'src')
-rw-r--r-- | src/openttd.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index d4ee57152..66425cec1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -436,10 +436,14 @@ int ttd_main(int argc, char *argv[]) case 'b': free(blitter); blitter = strdup(mgo.opt); break; #if defined(ENABLE_NETWORK) case 'D': - strcpy(musicdriver, "null"); - strcpy(sounddriver, "null"); - strcpy(videodriver, "dedicated"); - strcpy(blitter, "null"); + free(musicdriver); + free(sounddriver); + free(videodriver); + free(blitter); + musicdriver = strdup("null"); + sounddriver = strdup("null"); + videodriver = strdup("dedicated"); + blitter = strdup("null"); dedicated = true; if (mgo.opt != NULL) { /* Use the existing method for parsing (openttd -n). |