Skip to content

Commit 0ecccef

Browse files
committed
Improve LSX compatibility with incorrectly tagged file versions
1 parent 426c4e1 commit 0ecccef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LSLib/LS/Resources/LSX/LSXReader.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ private void ReadElement()
189189
}
190190
else
191191
{
192-
attrTypeId = Convert.ToUInt32(reader["type"]);
192+
if (!UInt32.TryParse(reader["type"], out attrTypeId))
193+
{
194+
attrTypeId = (uint)TypeNames[reader["type"]];
195+
}
193196
}
194197

195198
var attrName = reader["id"];

0 commit comments

Comments
 (0)