We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bf4e47 commit 812aa48Copy full SHA for 812aa48
1 file changed
src/SIL.Machine.Morphology.HermitCrab/PhonologicalRules/NarrowSynthesisRewriteSubruleSpec.cs
@@ -42,9 +42,16 @@ VariableBindings varBindings
42
}
43
44
ShapeNode[] nodes = targetMatch.Input.Shape.GetNodes(range).ToArray();
45
- for (int i = 0; i < _targetCount; i++)
+ int deleted = 0;
46
+ for (int i = 0; i < nodes.Length; i++)
47
+ {
48
+ if (nodes[i].IsDeleted())
49
+ continue;
50
nodes[i].SetDeleted(true);
-
51
+ deleted++;
52
+ if (deleted == _targetCount)
53
+ break;
54
+ }
55
MarkSuccessfulApply(targetMatch.Input);
56
57
0 commit comments