From c8cdc5d58cefac4b56476919a277da6c747cb099 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 23 Jul 2018 16:59:09 +0300 Subject: [PATCH] Fixed console errors when entering '\' or '\n' --- Barotrauma/BarotraumaShared/Source/DebugConsole.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs index 1ad87c716..7ada53b2d 100644 --- a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs @@ -1895,12 +1895,12 @@ namespace Barotrauma return; } - if (string.IsNullOrWhiteSpace(command)) return; + if (string.IsNullOrWhiteSpace(command) || command == "\\" || command == "\n") return; string[] splitCommand = SplitCommand(command); if (splitCommand.Length == 0) { - DebugConsole.ThrowError("Failed to execute command \"" + command + "\"!"); + ThrowError("Failed to execute command \"" + command + "\"!"); GameAnalyticsManager.AddErrorEventOnce( "DebugConsole.ExecuteCommand:LengthZero", GameAnalyticsSDK.Net.EGAErrorSeverity.Error,