Skip to content

Commit d7eefd8

Browse files
committed
Fix over-use of prioritySettingsEnd
1 parent ef2991d commit d7eefd8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3789,15 +3789,17 @@ int adjustEndOfPrioritySettings(int prioritySettingsEnd)
37893789
if (prioritySettingsEnd == 0)
37903790
return 0;
37913791

3792+
int adjustedPrioritySettingsEnd = prioritySettingsEnd;
3793+
37923794
// Check which of the priority settings are possible on this platform
37933795
// Deduct the ones which are not
37943796
for (int i = 0; i < prioritySettingsEnd; i++)
37953797
{
37963798
if (!settingPossibleOnPlatform(i))
3797-
prioritySettingsEnd--;
3799+
adjustedPrioritySettingsEnd--;
37983800
}
37993801

3800-
return prioritySettingsEnd;
3802+
return adjustedPrioritySettingsEnd;
38013803
}
38023804

38033805
// Allocate and fill the commandIndex table

0 commit comments

Comments
 (0)