From b165fa0e96231d19750e33c396bb5a29d77c8f7c Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Fri, 17 Sep 2021 09:36:27 +0200 Subject: [PATCH] Fix usage of sync_endl instead of endl causing UB mutex unlock. --- src/tools/training_data_generator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/training_data_generator.cpp b/src/tools/training_data_generator.cpp index 2be173b5..4f64f13e 100644 --- a/src/tools/training_data_generator.cpp +++ b/src/tools/training_data_generator.cpp @@ -715,9 +715,9 @@ namespace Stockfish::Tools const auto now_time = now(); out - << endl + << '\n' << 0 << " sfens, " - << "at " << now_string() << sync_endl; + << "at " << now_string() << endl; last_stats_report_time = now_time; @@ -730,10 +730,10 @@ namespace Stockfish::Tools const TimePoint elapsed = now_time - last_stats_report_time + 1; out - << endl + << '\n' << done << " sfens, " << new_done * 1000 / elapsed << " sfens/second, " - << "at " << now_string() << sync_endl; + << "at " << now_string() << endl; last_stats_report_time = now_time;