From 2039565fc917d862b03755c0172f448e73259ee6 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 23 Jun 2021 09:52:38 +0200 Subject: [PATCH] fixed bug with potentially changing global variable in thread When automatically incrementing level after solved game, the global variable to store the level number may be changed while the thread to upload the score to the server is just using it, which may cause the score to be submitted for the wrong level number. To fix this, the (already existing) local variable with the level number is used instead. --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 2daffc83..8c37e1c0 100644 --- a/src/files.c +++ b/src/files.c @@ -9311,7 +9311,7 @@ static void UploadScoreToServerExt(struct HttpRequest *request, levelset_author, leveldir_current->levels, leveldir_current->first_level, - level_nr, + nr, level_name, level_author, level.rate_time_over_score, -- 2.34.1