1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

core: flush stdout/stderr after sending text directly on them (fix corrupted data sent to hook_process() callback) (closes #442)

This commit is contained in:
Sébastien Helleu
2015-07-25 09:16:08 +02:00
parent b99a630705
commit 7572fec261
7 changed files with 18 additions and 3 deletions
+2
View File
@@ -4607,6 +4607,7 @@ COMMAND_CALLBACK(print)
else if (string_strcasecmp (argv[i], "-beep") == 0)
{
fprintf (stderr, "\a");
fflush (stderr);
return WEECHAT_RC_OK;
}
else if (argv[i][0] == '-')
@@ -4632,6 +4633,7 @@ COMMAND_CALLBACK(print)
if (text)
{
fprintf ((to_stdout) ? stdout : stderr, "%s", text);
fflush ((to_stdout) ? stdout : stderr);
free (text);
}
}