From 8565d408720c58e7c424fa04e0bd815ca23c483f Mon Sep 17 00:00:00 2001 From: LordMidas <55047920+LordMidas@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:11:28 -0400 Subject: [PATCH] fix: msu serde complains due to null strings in metadata emulator In a new campaign, the Name, ModificationData, CreationDate and FileName are all null in the real metadata. This causes no issues in vanilla as it accepts nulls into `writeString`. But this means that any SerDe done using MSU SerDe emulators on a new campaign will throw complaints about null being stored into String data container. --- msu/systems/serialization/metadata_emulator.nut | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/msu/systems/serialization/metadata_emulator.nut b/msu/systems/serialization/metadata_emulator.nut index e3c48a68d..560f1989e 100644 --- a/msu/systems/serialization/metadata_emulator.nut +++ b/msu/systems/serialization/metadata_emulator.nut @@ -13,6 +13,13 @@ { this.Data = {}; this.Version = ::Const.Serialization.Version; + // Have to initialize these to empty strings otherwise MSU SerDe + // complains about null being written as string on the very first + // serialization using MSU SerDe during a new campaign. + this.Name = ""; + this.ModificationDate = ""; + this.CreationDate = ""; + this.FileName = ""; } // this would ideally be an alternative static constructor