From 1b1ae55d580edb15add0a480a724ad5fb96274c4 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 26 Jan 2021 11:28:49 +0100 Subject: [PATCH] Tests: Fix crash on non-string plugin options parsing --- Il2CppTests/TestRunner.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Il2CppTests/TestRunner.cs b/Il2CppTests/TestRunner.cs index c7bc2de..2753210 100644 --- a/Il2CppTests/TestRunner.cs +++ b/Il2CppTests/TestRunner.cs @@ -93,8 +93,7 @@ namespace Il2CppInspector Console.WriteLine($"Setting option: {key} = {value}"); // Null default values must be castable to object - var targetType = ourPlugin[key]?.GetType() ?? typeof(object); - ourPlugin[key] = Convert.ChangeType(value, targetType); + ourPlugin.Plugin.Options.Single(o => o.Name == key).SetFromString(value); } } }