Skip to content

Commit bae3dd3

Browse files
committed
Fix off-by-one error on bounds check in JSISwitchableVariableLabel
1 parent b8b6443 commit bae3dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RasterPropMonitor/Auxiliary modules/JSISwitchableVariableLabel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private bool UpdateCheck()
172172
// Saw an out-of-range exception in the next if clause once as a
173173
// side effect of docking. Not sure if OnUpdate was called after
174174
// onDestroy, or before Start.
175-
if (activeLabel > labelsEx.Count)
175+
if (activeLabel >= labelsEx.Count)
176176
{
177177
activeLabel = labelsEx.Count - 1;
178178
if(activeLabel < 0)

0 commit comments

Comments
 (0)