Fix a divide by zero crash in TabCompletionLogic.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
if (string.IsNullOrWhiteSpace(text))
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
return text;
|
return text;
|
||||||
|
|
||||||
if (lastCompleted == text)
|
if (lastCompleted == text && candidates.Any())
|
||||||
{
|
{
|
||||||
lastCompleted = prefix + candidates[++currentCandidateIndex % candidates.Count] + suffix;
|
lastCompleted = prefix + candidates[++currentCandidateIndex % candidates.Count] + suffix;
|
||||||
return lastCompleted;
|
return lastCompleted;
|
||||||
|
|||||||
Reference in New Issue
Block a user