Fix a divide by zero crash in TabCompletionLogic.

This commit is contained in:
Paul Chote
2015-08-03 21:38:17 +01:00
parent 34bf5b5810
commit 0aca03158c

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (string.IsNullOrWhiteSpace(text))
return text;
if (lastCompleted == text)
if (lastCompleted == text && candidates.Any())
{
lastCompleted = prefix + candidates[++currentCandidateIndex % candidates.Count] + suffix;
return lastCompleted;