diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f9227033fd0ac4063628a9449bd440e3fc2345..22cc93bc4d935eaff9d2f3742513fdc86d012248 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 5bfcb6763c7ef9a1d81979b321f1ad2c90e4e605..9fa1df90bea19541cb573ce882252607594f7c42 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