From b82cc74a5dbbd9f79d444928e231bff844689747 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 15 Apr 2016 20:12:01 -0500 Subject: [PATCH] possibly fix crash in GB GPU debugger on operating systems using the wrong language (untested) --- BizHawk.Client.EmuHawk/tools/ToolManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 3bc23bcfb2..4f03eebaf5 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -331,7 +331,7 @@ namespace BizHawk.Client.EmuHawk else if (!(val is bool) && prop.PropertyType.IsPrimitive) { // numeric constanst are similarly hosed - val = Convert.ChangeType(val, prop.PropertyType); + val = Convert.ChangeType(val, prop.PropertyType, System.Globalization.CultureInfo.InvariantCulture); } prop.SetValue(tool, val, null); } @@ -345,7 +345,7 @@ namespace BizHawk.Client.EmuHawk data.Clear(); foreach (var prop in props) { - data.Add(prop.Name, prop.GetValue(tool, null)); + data.Add(prop.Name, prop.GetValue(tool, BindingFlags.GetProperty, Type.DefaultBinder, null, System.Globalization.CultureInfo.InvariantCulture)); } }