summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-14 17:06:54 +0000
committerdominik <dominik@openttd.org>2004-12-14 17:06:54 +0000
commit07367a113ca3a7f4731c2bf49a6781204ba2eeea (patch)
tree774f0b0e339da4251fefd9e474963fe17666205b
parent967425b368211a702bf6b78b17031ae105078a32 (diff)
downloadopenttd-07367a113ca3a7f4731c2bf49a6781204ba2eeea.tar.xz
(svn r1083) Fix: the console "script" command saves all output to the textfile, not only printf stuff (sign_de)
-rw-r--r--console.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/console.c b/console.c
index bcaddbdc2..211fb27b9 100644
--- a/console.c
+++ b/console.c
@@ -399,6 +399,12 @@ void IConsolePrint(uint16 color_code, const char* string)
}
free(_ex);
+ if (_iconsole_output_file != NULL) {
+ // if there is an console output file ... also print it there
+ fwrite(string, strlen(string), 1, _iconsole_output_file);
+ fwrite("\n", 1, 1, _iconsole_output_file);
+ }
+
if (_iconsole_win != NULL) SetWindowDirty(_iconsole_win);
}
@@ -414,12 +420,6 @@ void CDECL IConsolePrintF(uint16 color_code, const char* s, ...)
va_end(va);
IConsolePrint(color_code, buf);
-
- if (_iconsole_output_file != NULL) {
- // if there is an console output file ... also print it there
- fwrite(buf, len, 1, _iconsole_output_file);
- fwrite("\n", 1, 1, _iconsole_output_file);
- }
}
void IConsoleDebug(const char* string)