No longer truncate savegame version in gamelog.

Add an extended feature for changed savegame format.
This commit is contained in:
Jonathan G Rennison
2016-09-08 21:22:39 +01:00
parent 5672b6c2c8
commit db026ec8b0
5 changed files with 12 additions and 4 deletions

View File

@@ -75,6 +75,7 @@ void GamelogFree(LoggedAction *gamelog_action, uint gamelog_actions)
for (uint j = 0; j < la->changes; j++) {
const LoggedChange *lc = &la->change[j];
if (lc->ct == GLCT_SETTING) free(lc->setting.name);
if (lc->ct == GLCT_REVISION) free(lc->revision.text);
}
free(la->change);
}
@@ -414,8 +415,7 @@ void GamelogRevision()
LoggedChange *lc = GamelogChange(GLCT_REVISION);
if (lc == NULL) return;
memset(lc->revision.text, 0, sizeof(lc->revision.text));
strecpy(lc->revision.text, _openttd_revision, lastof(lc->revision.text), true);
lc->revision.text = stredup(_openttd_revision);
lc->revision.slver = SAVEGAME_VERSION;
lc->revision.modified = _openttd_revision_modified;
lc->revision.newgrf = _openttd_newgrf_version;