[Settings] Fix clearTask() overwriting pins of other tasks

OLD_TaskDeviceID only has N_TASKS - 9 elements, but clearTask() still wrote
OLD_TaskDeviceID[task]. For task index 3 and up this writes past the array
into TaskDevicePin1..3/TaskDevicePort of other tasks. The array is unused, so
the write is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aleksandr ZharovandClaude Opus 5.5 committed 2026-10-24 22:02:13 +05:00
1 parent 42b03c17ff
commit a513c8d631
1 file changed
-1
@@ -793,7 +793,6 @@ void SettingsStruct_tmpl<N_TASKS>::clearTask(taskIndex_t task) {
TaskDeviceSendData[i][task] = false;
}
TaskDeviceNumber[task] = 0u; //.setInvalid();
OLD_TaskDeviceID[task] = 0u; // UNUSED: this can be removed
TaskDevicePin1[task] = -1;
TaskDevicePin2[task] = -1;
TaskDevicePin3[task] = -1;