diff --git a/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs b/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs index f83932db..0d0322d4 100644 --- a/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs +++ b/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs @@ -127,7 +127,7 @@ public class DataSaubStatDrillingQualityService : IDataSaubStatDrillingQualitySe while (indexEnd < dataSaub.Count() - 1) { indexStart = Array.FindIndex(dataSaub, indexEnd, t => t.IdFeedRegulator == idFeedRegulator); - if (indexStart < 0) + if (indexStart < 0 || indexStart == dataSaub.Count() - 1) break; indexEnd = FindIndexEnd(indexStart, idFeedRegulator, dataSaub);