Skip to content

Commit 9612141

Browse files
committed
Fix cycling lights from causing an index out of bounds exception
1 parent 50378f6 commit 9612141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/RunActivity/Viewer3D/Lights.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ protected void SetUpTransitions(Action<int, int, int> transitionHandler)
437437
for (var i = 0; i < Light.States.Count - 1; i++)
438438
transitionHandler(i, i, i + 1);
439439
for (var i = Light.States.Count - 1; i > 0; i--)
440-
transitionHandler(Light.States.Count * 2 - 1 - i, i, i - 1);
440+
transitionHandler((Light.States.Count * 2 - 2) - i, i, i - 1);
441441
}
442442
else
443443
{

0 commit comments

Comments
 (0)