Skip to content

Commit

Permalink
Continue in the face of too-short sections
Browse files Browse the repository at this point in the history
  • Loading branch information
kythyria committed Apr 25, 2023
1 parent 48d24ab commit 3f8b47d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PD2ModelParser/Importers/ModelReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ private static void Read(FullModelData data, string filepath)
}

if (ms.Position != sh.End)
throw new Exception(string.Format("Section of type {2} {0} read more than its length of {1} ", sh.id, sh.size, sh.type));
{
//throw new Exception(string.Format("Section of type {2} {0} read more than its length of {1} ", sh.id, sh.size, sh.type));
Log.Default.Warn("Section {0} (type {2:X}) was too short ({1} bytes read)", sh.id, sh.size, sh.type);
}

Log.Default.Debug("Section {0} at {1} length {2}",
section.GetType().Name, sh.offset, sh.size);
Expand Down

0 comments on commit 3f8b47d

Please sign in to comment.