Commit b58204bc authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Consistent validation of override operator in runtime leaderboard record writes.

parent b833c2d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,7 +4,11 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]
### Changed
- Improve graceful shutdown of Google IAP receipt processor.

### Fixed
- Consistent validation of override operator in runtime leaderboard record writes.

## [3.15.0] - 2023-01-04
### Added
+1 −0
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ func main() {
	consoleServer.Stop()
	matchmaker.Stop()
	leaderboardScheduler.Stop()
	googleRefundScheduler.Stop()
	tracker.Stop()
	statusRegistry.Stop()
	sessionCache.Stop()
+2 −2
Original line number Diff line number Diff line
@@ -5179,9 +5179,9 @@ func (n *runtimeJavascriptNakamaModule) leaderboardRecordWrite(r *goja.Runtime)
				overrideOperator = api.Operator_BEST
			case "set":
				overrideOperator = api.Operator_SET
			case "incr":
			case "incr", "increment":
				overrideOperator = api.Operator_INCREMENT
			case "decr":
			case "decr", "decrement":
				overrideOperator = api.Operator_DECREMENT
			default:
				panic(r.NewTypeError(ErrInvalidOperator.Error()))
+2 −2
Original line number Diff line number Diff line
@@ -6679,9 +6679,9 @@ func (n *RuntimeLuaNakamaModule) leaderboardRecordWrite(l *lua.LState) int {
			overrideOperator = api.Operator_BEST
		case "set":
			overrideOperator = api.Operator_SET
		case "incr":
		case "incr", "increment":
			overrideOperator = api.Operator_INCREMENT
		case "decr":
		case "decr", "decrement":
			overrideOperator = api.Operator_DECREMENT
		default:
			l.ArgError(7, ErrInvalidOperator.Error())