History

GSF.Core.Shared: Fixed #17 - bug in ArrayExtensions.IndexOf() where it was calculating the wrong count in calls to Array.IndexOf().

StephenCWills committed 9 years ago

Commit d4a43c61 parent 854b1241 file · +1 −1Browse files

Showing the changes to Source/Libraries/GSF.Core.Shared/ArrayExtensions.cs (1 of 1 file). Show all

Unified · Split

Source/Libraries/GSF.Core.Shared/ArrayExtensions.cs+1−1
@@ -457,7 +457,7 @@ namespace GSF · 456 unmodified lines
457 // If sequence doesn't match, search for next first-item457 // If sequence doesn't match, search for next first-item
458 if (array[index + x].CompareTo(sequenceToFind[x]) != 0)458 if (array[index + x].CompareTo(sequenceToFind[x]) != 0)
459 {459 {
460 index = Array.IndexOf(array, sequenceToFind[0], index + 1, length - (index + 1));460 index = Array.IndexOf(array, sequenceToFind[0], index + 1, (startIndex + length) - (index + 1));
461 break;461 break;
462 }462 }
463 463

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t