diff options
author | tron <tron@openttd.org> | 2005-02-18 08:49:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-02-18 08:49:04 +0000 |
commit | eff325209596f7bb57a63ce66eb222d5b3a8f674 (patch) | |
tree | b75b3abf8b6a5a19c5bc66ae0e3d2825ee5ecfb4 | |
parent | 4a4b9d145d0a2a5fef2d563e736b21eb1fdaba3a (diff) | |
download | openttd-eff325209596f7bb57a63ce66eb222d5b3a8f674.tar.xz |
(svn r1887) Stylistic change of ConExec()
-rw-r--r-- | console_cmds.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/console_cmds.c b/console_cmds.c index aea87fa40..e7850924d 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -594,18 +594,15 @@ DEF_CONSOLE_CMD(ConNetworkConnect) DEF_CONSOLE_CMD(ConExec) { char cmd[1024]; - bool doerror; - if (argc<2) return NULL; + if (argc < 2) return NULL; - doerror = true; _script_file = fopen(argv[1], "r"); if (_script_file == NULL) { - if (argc>2) if (atoi(argv[2])==0) doerror=false; - if (doerror) IConsoleError("script file not found"); + if (argc <= 2 || atoi(argv[2]) != 0) IConsoleError("script file not found"); return NULL; - } + } _script_running = true; |