Mercurial > 510Connectbot
diff src/de/mud/terminal/VDUBuffer.java @ 308:42b15aaa7ac7 ganymed
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:21:50 -0700 |
parents | 071eccdff8ea |
children |
line wrap: on
line diff
--- a/src/de/mud/terminal/VDUBuffer.java Wed Jul 30 13:38:04 2014 -0700 +++ b/src/de/mud/terminal/VDUBuffer.java Wed Jul 30 14:21:50 2014 -0700 @@ -159,7 +159,9 @@ public void putChar(int c, int l, char ch, int attributes) { int ll = screenBase + l; + if ((ll >= bufSize) || (c >= width)) return; // ignore characters outside our buffer + charArray[ll][c] = ch; charAttributes[ll][c] = attributes; @@ -588,8 +590,8 @@ * @param l line */ public void setCursorPosition(int c, int l) { - cursorX = (c > width-1) ? width-1 : c; - cursorY = (l > height-1) ? height-1 : l; + cursorX = (c > width - 1) ? width - 1 : c; + cursorY = (l > height - 1) ? height - 1 : l; } /**