Saveload: Fix NGRF chunks being saved with incorrect table SL_ARR format

Array length prefix was missing

See also: https://github.com/OpenTTD/bananas-api/pull/456
This commit is contained in:
Jonathan G Rennison
2024-03-30 10:16:26 +00:00
parent 9f7d25e02d
commit 98f1fb2722
5 changed files with 49 additions and 1 deletions

View File

@@ -104,6 +104,9 @@ static void Save_NGRF()
static void Load_NGRF_common(GRFConfig *&grfconfig)
{
if (SlXvIsFeaturePresent(XSLFI_TABLE_NEWGRF_SL, 1, 1)) {
SlLoadTableWithArrayLengthPrefixesMissing();
}
std::vector<SaveLoad> sld = SlTableHeaderOrRiff(_grfconfig_desc);
ClearGRFConfigList(&grfconfig);
while (SlIterateArray() != -1) {