From f3771e7b98e33b956e6ec8baec0b3a2d04510220 Mon Sep 17 00:00:00 2001 From: Hathor86 Date: Sun, 22 Nov 2015 23:43:39 +0100 Subject: [PATCH] Ambigous call fixed This bug occured sometime, when we try to call Load() by reflection without parameters. --- BizHawk.Client.EmuHawk/tools/ToolManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 4e0965708c..bf2e5f3381 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -56,7 +56,8 @@ namespace BizHawk.Client.EmuHawk } else { - MethodInfo method = GetType().GetMethod("Load").MakeGenericMethod(toolType); + //The type[] in parameter is used to avoid an ambigous name exception + MethodInfo method = GetType().GetMethod("Load", new Type[] { typeof(bool) }).MakeGenericMethod(toolType); return (IToolForm)method.Invoke(this, new object[] { focus }); } }