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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user