mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Check for underflow and overflow
This commit is contained in:
parent
e422e89e00
commit
1f58990edb
@ -94,7 +94,7 @@ public class SerializedAssetCollection : AssetCollection
|
||||
for (int i = 0; i < file.Metadata.Object.Length; i++)
|
||||
{
|
||||
ObjectInfo objectInfo = file.Metadata.Object[i];
|
||||
if (objectInfo.ClassID == 115)//MonoScript
|
||||
if (objectInfo.TypeID == 115)//MonoScript
|
||||
{
|
||||
if (!collection.Assets.ContainsKey(objectInfo.FileID))
|
||||
{
|
||||
|
||||
@ -157,7 +157,10 @@ namespace AssetRipper.IO.Files.SerializedFiles.Parser
|
||||
{
|
||||
SerializedType type = types[SerializedTypeIndex];
|
||||
TypeID = type.TypeID;
|
||||
ClassID = (short)type.TypeID;
|
||||
if (type.TypeID < short.MaxValue)
|
||||
{
|
||||
ClassID = (short)type.TypeID;
|
||||
}
|
||||
ScriptTypeIndex = type.ScriptTypeIndex;
|
||||
Stripped = type.IsStrippedType;
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<DebugType>embedded</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
|
||||
<Version>0.3.0.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user