Mercurial > hg > openttd
changeset 8504:6daa6c45197c draft
(svn r12079) -Fix: Use search paths when opening console scripts.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 07 Feb 2008 10:01:18 +0000 |
parents | eab268d8974a |
children | 1a32b4c9019b |
files | src/console_cmds.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -810,7 +810,7 @@ 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 @@ IConsoleError("Encountered errror while trying to read from script file"); _script_running = false; - fclose(_script_file); + FioFCloseFile(_script_file); return true; }