From 6890561723d2960ed1d7ebb674ca9de9fbb33f49 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Thu, 18 Jun 2020 09:06:55 -0700 Subject: [PATCH] Severity Code Description Project File Line Suppression State Warning CA1307 The behavior of 'string.IndexOf(string)' could vary based on the current user's locale settings. Replace this call in 'PowerLauncher.MainWindow.ListView_FirstItem(string)' with a call to 'string.IndexOf(string, System.StringComparison)'. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\MainWindow.xaml.cs 269 Active --- src/modules/launcher/PowerLauncher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index 1a2047e4f7..dfecf918dc 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -277,7 +277,7 @@ namespace PowerLauncher int selectedIndex = _viewModel.Results.SelectedIndex; if (selectedItem != null && selectedIndex == 0) { - if (selectedItem.IndexOf(input) == 0) + if (selectedItem.IndexOf(input, StringComparison.InvariantCultureIgnoreCase) == 0) { return selectedItem; }