Fixed DebugConsole selecting non-command lines if up/down is pressed when there are no commands in the console. Closes #927

This commit is contained in:
Joonas Rikkonen
2018-11-22 15:16:30 +02:00
parent 76c3c062f4
commit 91a8a7e11d

View File

@@ -1895,7 +1895,7 @@ namespace Barotrauma
if (++i >= Messages.Count) break;
} while (!Messages[selectedIndex].IsCommand);
return Messages[selectedIndex].Text;
return !Messages[selectedIndex].IsCommand ? "" : Messages[selectedIndex].Text;
}
public static void ExecuteCommand(string command)