summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-23 14:40:19 +0000
committertruelight <truelight@openttd.org>2007-06-23 14:40:19 +0000
commit0844eaabc574ff8f43ef68c6aa6c4aa1b1190d52 (patch)
treed0226f0f5a878c6423763e21ceaf67bc552fbac8
parent62cb041238f8948f1411827b6a2d93d9178c7627 (diff)
downloadopenttd-0844eaabc574ff8f43ef68c6aa6c4aa1b1190d52.tar.xz
(svn r10295) -Fix [FS#775]: flush stdout on dedicated server output to ensure an update of stdout (Zuu)
-rw-r--r--src/console.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/console.cpp b/src/console.cpp
index 31f9d6e5f..cdb8f4bf7 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -388,7 +388,8 @@ void IConsolePrint(uint16 color_code, const char *string)
str_validate(str);
if (_network_dedicated) {
- printf("%s\n", str);
+ fprintf(stdout, "%s\n", str);
+ fflush(stdout);
IConsoleWriteToLogFile(str);
free(str); // free duplicated string since it's not used anymore
return;