mcabber/src/screen.c
changeset 1566 d64e0b2855fc
parent 1563 c1d0f906d379
child 1573 ece4f26bf9ff
--- a/mcabber/src/screen.c	Tue Jan 27 22:19:04 2009 +0100
+++ b/mcabber/src/screen.c	Sun Feb 08 10:08:05 2009 +0100
@@ -3583,6 +3583,7 @@
 {
   char *wprint_char_fmt = "%c";
   int point;
+  int nrchar = maxX;
   char *ptrCur = inputLine + inputline_offset;
 
 #ifdef UNICODE
@@ -3593,7 +3594,7 @@
 
   wmove(inputWnd, 0, 0); // problem with backspace
 
-  while (*ptrCur) {
+  while (*ptrCur && nrchar-- > 0) {
     point = ptrCur - inputLine;
     if (maskLine[point])
       wattrset(inputWnd, A_UNDERLINE);