From fa1d6c7fb601f544bc0b7d226a23bc27ed3271ec Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Tue, 14 Jan 2025 09:03:50 -0500 Subject: [PATCH] Small bug in NParallelTextCorpus --- src/SIL.Machine/Corpora/NParallelTextCorpus.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SIL.Machine/Corpora/NParallelTextCorpus.cs b/src/SIL.Machine/Corpora/NParallelTextCorpus.cs index d3df81da..b496e584 100644 --- a/src/SIL.Machine/Corpora/NParallelTextCorpus.cs +++ b/src/SIL.Machine/Corpora/NParallelTextCorpus.cs @@ -186,6 +186,8 @@ NParallelTextRow row in CreateMinRefRows( } foreach (int i in minRefIndexes) { + if (completed[i]) + continue; sameRefRows[i].Add(enumerators[i].Current); bool isCompleted = !enumerators[i].MoveNext(); completed[i] = isCompleted; @@ -241,6 +243,8 @@ NParallelTextRow row in CreateRows( for (int i = 0; i < rangeInfo.Rows.Count; i++) { + if (completed[i]) + continue; sameRefRows[i].Add(currentRows[i]); bool isCompleted = !enumerators[i].MoveNext(); completed[i] = isCompleted;