diff --git a/SymSpell/SymSpell.cs b/SymSpell/SymSpell.cs index c640ea1..78a5b97 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 (part.Any() && Char.IsUpper(part[0])) + if ((part.Length>0) && Char.IsUpper(part[0])) { char[] a = topResult.ToCharArray(); a[0] = char.ToUpper(topResult[0]);