Don't make assumptions on the content of the textentry text buffer beyond the first '\0'.
diff --git a/contiki-c64/ctk/ctk-80col.c b/contiki-c64/ctk/ctk-80col.c
index 9c6aee2..21f0a28 100644
--- a/contiki-c64/ctk/ctk-80col.c
+++ b/contiki-c64/ctk/ctk-80col.c
@@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
- * $Id: ctk-80col.c,v 1.15 2005/05/05 20:55:26 oliverschmidt Exp $
+ * $Id: ctk-80col.c,v 1.16 2006/05/28 20:40:16 oliverschmidt Exp $
*/
#include "contiki.h"
@@ -698,8 +698,11 @@
w->widget.textentry.ypos == j) {
revers(0);
cputcxy(xpos, ypos, '>');
+ c = 1;
for(i = 0; i < w->w; ++i) {
- c = text[i + xscroll];
+ if(c != 0) {
+ c = text[i + xscroll];
+ }
if(i == w->widget.textentry.xpos - xscroll) {
revers(1);
} else {