From d0386bbe022f30e24d575dda9c1655a3e7ff63b8 Mon Sep 17 00:00:00 2001 From: Andrei Mihu Date: Tue, 10 Aug 2021 13:21:18 +0100 Subject: [PATCH] Fix parameter usage in leaderboard score set operator. --- CHANGELOG.md | 1 + server/core_leaderboard.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f922703..22cc93bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Fix error handling when attempting to write records to a tournament that does not exist. - Fix JS runtime missing fields from leaderboards/tournaments get, list and write functions. - Fix JS runtime ownerId field not working correctly in leaderboard/tournament records list functions. +- Fix parameter usage in leaderboard score set operator. ## [3.4.0] - 2021-07-08 ### Added diff --git a/server/core_leaderboard.go b/server/core_leaderboard.go index 5bfcb6763..9fa1df90b 100644 --- a/server/core_leaderboard.go +++ b/server/core_leaderboard.go @@ -419,7 +419,7 @@ func LeaderboardRecordWrite(ctx context.Context, logger *zap.Logger, db *sql.DB, subscoreAbs = 0 case LeaderboardOperatorSet: opSQL = "score = $4, subscore = $5" - filterSQL = " WHERE leaderboard_record.score <> $5 OR leaderboard_record.subscore <> $5" + filterSQL = " WHERE leaderboard_record.score <> $4 OR leaderboard_record.subscore <> $5" scoreDelta = score subscoreDelta = subscore scoreAbs = score -- GitLab