Skip to content

Commit

Permalink
Let the reader recover at least part of the value
Browse files Browse the repository at this point in the history
We will assume that the recovery reader can return a error string, but
at the same time set some value
  • Loading branch information
Gliese852 committed Jan 28, 2025
1 parent 502f986 commit cbb15f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/pigui/modules/new-game-window/game-param.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ GameParam.reader = Helpers.versioned {{
---@return string? errorString
function GameParam:fromSaveGame(saveGame)
local value, errorString = self.reader(saveGame)
if value then self.value = value end
if errorString then return errorString end
self.value = value
end

function GameParam:isEmpty()
Expand Down

0 comments on commit cbb15f5

Please sign in to comment.