diff options
author | peter1138 <peter1138@openttd.org> | 2008-02-07 10:01:18 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-02-07 10:01:18 +0000 |
commit | 1bcc1927b17e06a9223ef2bdcad47afc93b5258a (patch) | |
tree | 0436e627933d231b0c1ef8bbf3048dba54afb4bc /src | |
parent | 431c3ce3c131e062d16a14c841beb9d5db4e5698 (diff) | |
download | openttd-1bcc1927b17e06a9223ef2bdcad47afc93b5258a.tar.xz |
(svn r12079) -Fix: Use search paths when opening console scripts.
Diffstat (limited to 'src')
-rw-r--r-- | src/console_cmds.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index fda8d5422..c18d2f6df 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -810,7 +810,7 @@ DEF_CONSOLE_CMD(ConExec) if (argc < 2) return false; - _script_file = fopen(argv[1], "r"); + _script_file = FioFOpenFile(argv[1], "r", BASE_DIR); if (_script_file == NULL) { if (argc == 2 || atoi(argv[2]) != 0) IConsoleError("script file not found"); @@ -834,7 +834,7 @@ DEF_CONSOLE_CMD(ConExec) IConsoleError("Encountered errror while trying to read from script file"); _script_running = false; - fclose(_script_file); + FioFCloseFile(_script_file); return true; } |