code: explicitly call init in some named constructors
[nit.git] / contrib / nitrpg / src / statistics.nit
index 0bdb421..2827ae9 100644 (file)
@@ -166,6 +166,7 @@ class GameStats
 
        # Load `self` from saved data.
        init from_json(game: Game, period: String, owner: GameEntity, json: JsonObject) do
+               init(game, period, owner)
                var values = json.get_or_null("values")
                if not values isa JsonObject then return
                for k, v in values do self[k] = v.as(Int)