(svn r12079) -Fix: Use search paths when opening console scripts.
authorpeter1138
Thu, 07 Feb 2008 10:01:18 +0000
changeset 8504 f4ea0ba39c03
parent 8503 1fa1d001eac0
child 8505 c175d34fe020
(svn r12079) -Fix: Use search paths when opening console scripts.
src/console_cmds.cpp
--- a/src/console_cmds.cpp	Thu Feb 07 04:47:38 2008 +0000
+++ b/src/console_cmds.cpp	Thu Feb 07 10:01:18 2008 +0000
@@ -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;
 }