Skip to content

Commit 7d41c80

Browse files
committed
Fix bad logic for error checking
1 parent 8664494 commit 7d41c80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/ORTS.Settings/RailDriverSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ public string CheckForErrors(byte[] buttonSettings)
214214
{
215215
StringBuilder errors = new StringBuilder();
216216

217-
var duplicates = buttonSettings.Where(button => button < 255).
218-
Select((value, index) => new { Index = index, Button = value }).
217+
var duplicates = buttonSettings.Select((value, index) => new { Index = index, Button = value }).
218+
Where(g => g.Button < 255).
219219
GroupBy(g => g.Button).
220220
Where(g => g.Count() > 1).
221221
OrderBy(g => g.Key);

0 commit comments

Comments
 (0)