Skip to content

Commit 9220cf6

Browse files
committed
Fix parsing of Win10 product names from registry
1 parent e38726d commit 9220cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BizHawk.Common/OSTailoredCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static string GetRegValue(string key)
2424
{
2525
using var proc = ConstructSubshell("REG", $@"QUERY ""HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"" /V {key}");
2626
proc.Start();
27-
return proc.StandardOutput.ReadToEnd().Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new[] { '\t', ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
27+
return proc.StandardOutput.ReadToEnd().Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new[] { "\t", " " }, StringSplitOptions.RemoveEmptyEntries)[2];
2828
}
2929
if (CurrentOS != DistinctOS.Windows) return null;
3030
var rawWinVer = float.Parse(GetRegValue("CurrentVersion"), NumberFormatInfo.InvariantInfo); // contains '.' even when system-wide decimal separator is ','

0 commit comments

Comments
 (0)