1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

ColorGradient - Fixed GetColor returning the first stop if position was after the last stop

This commit is contained in:
Robert 2023-06-24 15:33:59 +02:00
parent f43ebd2153
commit 4726190355

View File

@ -241,7 +241,7 @@ public class ColorGradient : IList<ColorGradientStop>, IList, INotifyCollectionC
return _stops[^1].Color;
//find the first stop after the position
int stop2Index = 0;
int stop2Index = -1;
for (int i = 0; i < _stops.Count; i++)
{