[boskid][1.1.57] NaN in global table silently corrupts savefiles
Posted: Wed Apr 20, 2022 5:07 pm
It appears that NaN values in a mod or scenario's global table are flagged as being corrupt when trying to load a savefile, but not when making it. This is problematic, because the player can easily overwrite all of their savefiles/autosaves without realizing they're all corrupt. It would be great if the same validation can be done while saving to limit the damage and alert the player to the problem. The other option would be to allow NaN to be loaded to global tables without flagging the data as corrupt.
To reproduce:
1. Start a new vanilla game.
2. Type `/c global.x = 0/0` in the console.
3. Save the game.
4. Attempt to load the savefile you created.
To reproduce:
1. Start a new vanilla game.
2. Type `/c global.x = 0/0` in the console.
3. Save the game.
4. Attempt to load the savefile you created.