From 444a19a08720b9283ed8925697fff839d0306087 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 1 Oct 2023 10:06:26 +0200 Subject: [PATCH] fflush after puts to fix piping replay path --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 68b3c28..688f72a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2121,6 +2121,7 @@ int main(int argc, char **argv) { if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) { save_replay_thread.get(); puts(save_replay_output_filepath.c_str()); + fflush(stdout); std::lock_guard lock(write_output_mutex); save_replay_packets.clear(); } @@ -2142,6 +2143,7 @@ int main(int argc, char **argv) { if(save_replay_thread.valid()) { save_replay_thread.get(); puts(save_replay_output_filepath.c_str()); + fflush(stdout); std::lock_guard lock(write_output_mutex); save_replay_packets.clear(); }