Fix DetectedOperationService "Index was outside the bounds of the array" wile skipping

This commit is contained in:
ngfrolov 2024-07-26 17:25:05 +05:00
parent 2f5dfaae36
commit b4406338db
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -237,12 +237,9 @@ public class DetectedOperationService : IDetectedOperationService
break;
}
var skip = 1;
while (IsChangingTelemetryInterval(detectableTelemetries[positionBegin], detectableTelemetries[positionBegin + skip]))
skip++;
positionBegin += skip;
var point0 = detectableTelemetries[positionBegin];
while (positionBegin < positionEnd && IsChangingTelemetryInterval(point0, detectableTelemetries[++positionBegin]))
;
}
return (detectableTelemetries[positionBegin].DateTime, detectedOperations);