Every line in a multiline textentry widget is supposed to have an addtional zero termination so take that into account when computing line offsets.
diff --git a/contiki-c64/ctk/ctk-80col.c b/contiki-c64/ctk/ctk-80col.c
index 141cabf..9c6aee2 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.14 2005/05/04 22:06:05 oliverschmidt Exp $
+ * $Id: ctk-80col.c,v 1.15 2005/05/05 20:55:26 oliverschmidt Exp $
  */
 
 #include "contiki.h"
@@ -730,7 +730,7 @@
 	}
       }
       ++ypos;
-      text += w->w;
+      text += w->widget.textentry.len + 1;
     }
     revers(0);
     break;