Fix console backspace exception (#4465)

This commit is contained in:
Leon Friedrich
2023-09-30 14:05:29 +10:00
committed by GitHub
parent c4c528478e
commit 57897161d0

View File

@@ -196,7 +196,7 @@ namespace Robust.Server.Console
break;
case ConsoleKey.Backspace:
if (currentBuffer.Length > 0)
if (currentBuffer.Length > 0 && internalCursor > 0)
{
currentBuffer = currentBuffer.Remove(internalCursor - 1, 1);
internalCursor--;