Formats: Don't crash on secondary load strategies with existing type mappings (#140)
This commit is contained in:
@@ -121,8 +121,12 @@ namespace Il2CppInspector
|
||||
|
||||
// Set width of long (convert to sizeof(int) for 32-bit files)
|
||||
if (stream[0].Bits == 32) {
|
||||
try {
|
||||
stream[0].AddPrimitiveMapping(typeof(long), typeof(int));
|
||||
} catch (ArgumentException) { }
|
||||
try {
|
||||
stream[0].AddPrimitiveMapping(typeof(ulong), typeof(uint));
|
||||
} catch (ArgumentException) { }
|
||||
}
|
||||
|
||||
return (Il2CppBinary) Activator.CreateInstance(type, stream[0], statusCallback);
|
||||
|
||||
Reference in New Issue
Block a user