Mercurial > 510Connectbot
diff src/de/mud/terminal/VDUBuffer.java @ 342:175c7d68f3c4
merge ganymed into mainline
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 31 Jul 2014 16:33:38 -0700 |
parents | 071eccdff8ea |
children |
line wrap: on
line diff
--- a/src/de/mud/terminal/VDUBuffer.java Thu Jul 17 22:09:05 2014 -0700 +++ b/src/de/mud/terminal/VDUBuffer.java Thu Jul 31 16:33:38 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; } /**