Indeed, gamescripts just pass on the data they want saved as an object similar to a python dictionary to OpenTTD (with key-value pairs), which will add it to the save file. And then they parse the result in the predescribed format when loading a save game.
Do you have a backup of the save game, and have you tried using that (on the off chance that file really got corrupted)?
Try using the 'stable' version of openTTD with your save game, located at https://www.openttd.org/en/download-stable
, instead of using an update program. Just follow the instructions in the installer for your platform. On linux, you can also use your distribution's packages, although they may be out of date for more conservative distro's like Mint. This version should be save-game compatible with any other stable version, as well as most of the trunk versions from long enough ago.
As noted above, if you modified your openTTD with patches, there's a good chance these broke save-game compatibility. (Even if a patch follows best-practice, which is supporting save-game transitions from all openttd versions from before the patch, thing is that trunk will add new things to saveload.cpp, breaking compatibility with a patched earlier version at some point in the future, e.g. you can't 'upgrade' your openttd and expect savegames to work using patches.)