Skip to content

Commit

Permalink
Fix LT-21890: Deleting from right side of affix process rule crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmaxwell3 committed Sep 19, 2024
1 parent cbf79d5 commit 5b11982
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/LexText/Morphology/AffixRuleFormulaControl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015 SIL International
// Copyright (c) 2015 SIL International
// This software is licensed under the LGPL, version 2.1 or later
// (http://www.gnu.org/licenses/lgpl-2.1.html)

Expand Down Expand Up @@ -716,7 +716,7 @@ protected bool RemoveFromOutput(bool forward, SelectionHelper sel, out int index
else
{
int idx = GetIndexToRemove(mappings, sel, forward);
if (idx > -1)
if (idx > -1 && idx < mappings.Count())
{
var mapping = (IMoRuleMapping) mappings[idx];
index = idx - 1;
Expand Down

0 comments on commit 5b11982

Please sign in to comment.