diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs index cb6c83ada..9e117a51d 100644 --- a/Subsurface/Source/DebugConsole.cs +++ b/Subsurface/Source/DebugConsole.cs @@ -850,7 +850,7 @@ namespace Barotrauma int characterIndex; string characterName; - if (int.TryParse(commands.Last(), out characterIndex)) + if (int.TryParse(commands.Last(), out characterIndex) && commands.Length > 2) { characterName = string.Join(" ", commands.Skip(1).Take(commands.Length - 2)).ToLowerInvariant(); }