Output an error when an unsupported CPU architecture is detected

This commit is contained in:
Katy Coe
2019-10-22 16:23:58 +02:00
parent 6075358dfe
commit 9ab6d16dd0
2 changed files with 10 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ namespace Il2CppInspector
// Get type from image architecture
var type = Assembly.GetExecutingAssembly().GetType("Il2CppInspector.Il2CppBinary" + stream.Arch.ToUpper());
if (type == null)
return null;
throw new InvalidOperationException("Unsupported architecture: " + stream.Arch);
var inst = (Il2CppBinary) Activator.CreateInstance(type, stream);