diff --git a/src/unforge/ComplexTypes/DataForgeDataMapping.cs b/src/unforge/ComplexTypes/DataForgeDataMapping.cs index 13c37f0a..83a58e08 100644 --- a/src/unforge/ComplexTypes/DataForgeDataMapping.cs +++ b/src/unforge/ComplexTypes/DataForgeDataMapping.cs @@ -8,16 +8,21 @@ namespace unforge { public class DataForgeDataMapping : _DataForgeSerializable { - public UInt16 StructIndex { get; set; } - public UInt16 StructCount { get; set; } + public UInt32 StructIndex { get; set; } + public UInt32 StructCount { get; set; } public UInt32 NameOffset { get; set; } public String Name { get { return this.DocumentRoot.ValueMap[this.NameOffset]; } } public DataForgeDataMapping(DataForge documentRoot) : base(documentRoot) { - this.StructCount = this._br.ReadUInt16(); - this.StructIndex = this._br.ReadUInt16(); + if(this.DocumentRoot.FileVersion >= 5) { + this.StructCount = this._br.ReadUInt32(); + this.StructIndex = this._br.ReadUInt32(); + } else { + this.StructCount = this._br.ReadUInt16(); + this.StructIndex = this._br.ReadUInt16(); + } this.NameOffset = documentRoot.StructDefinitionTable[this.StructIndex].NameOffset; }