diff --git a/SymSpell/SymSpell.cs b/SymSpell/SymSpell.cs index 6014781..c640ea1 100644 --- a/SymSpell/SymSpell.cs +++ b/SymSpell/SymSpell.cs @@ -1124,7 +1124,7 @@ public List LookupCompound(string input, int editDistanceMax) topResult = results[0].term; //v6.7 //retain/preserve upper case - if (Char.IsUpper(part[0])) + if (part.Any() && Char.IsUpper(part[0])) { char[] a = topResult.ToCharArray(); a[0] = char.ToUpper(topResult[0]);