Changeset - r8504:a1a9b7464a63
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-02-07 10:01:18
peter1138@openttd.org
(svn r12079) -Fix: Use search paths when opening console scripts.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/console_cmds.cpp
Show inline comments
 
@@ -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;
 
}
 

	
0 comments (0 inline, 0 general)