From f5578706b23634a512abf9157f5f9c7c5f56a70a Mon Sep 17 00:00:00 2001 From: Leandro Nini Date: Sun, 20 Oct 2024 20:39:36 +0200 Subject: [PATCH] Mark variable atomic as it is being altered in a separate thread --- src/player.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/player.h b/src/player.h index 37b8918..3532c0c 100644 --- a/src/player.h +++ b/src/player.h @@ -42,6 +42,7 @@ #include #include #include +#include #ifdef HAVE_TSID # if HAVE_TSID > 1 @@ -216,7 +217,7 @@ class ConsolePlayer struct m_timer_t { // secs uint_least32_t start; - uint_least32_t current; + std::atomic current; uint_least32_t stop; uint_least32_t length; bool valid;