Terminal cursor bounds checking

This commit is contained in:
Lignum 2017-05-05 00:08:10 +02:00
parent 4e3def39e0
commit 4b8493baab
No known key found for this signature in database
GPG Key ID: E4DE8F54CA0912BA
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ public void draw( Minecraft mc, int xOrigin, int yOrigin, int mouseX, int mouseY
y += FixedWidthFontRenderer.FONT_HEIGHT;
}
if( tblink )
if( tblink && tx >= 0 && ty >= 0 && tx < tw && ty < th )
{
TextBuffer cursor = new TextBuffer( '_', 1 );
TextBuffer cursorColour = new TextBuffer( "0123456789abcdef".charAt( terminal.getTextColour() ), 1 );