From: Holger Schemel Date: Wed, 23 Jun 2021 07:52:38 +0000 (+0200) Subject: fixed bug with potentially changing global variable in thread X-Git-Tag: 4.3.0.0~120 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2039565fc917d862b03755c0172f448e73259ee6;p=rocksndiamonds.git 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. --- 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,