From 62a48a4138ca63555a6fbd91a895a82d70808b30 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Wed, 30 Aug 2006 22:15:25 +0000 Subject: [PATCH] Don't make assumptions on textentry contents beyond the first '\0'. --- core/ctk/ctk-conio-service.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/ctk/ctk-conio-service.c b/core/ctk/ctk-conio-service.c index 852516373..dc5cc2ae2 100644 --- a/core/ctk/ctk-conio-service.c +++ b/core/ctk/ctk-conio-service.c @@ -29,7 +29,7 @@ * * This file is part of the "ctk" console GUI toolkit for cc65 * - * $Id: ctk-conio-service.c,v 1.2 2006/08/13 14:08:43 oliverschmidt Exp $ + * $Id: ctk-conio-service.c,v 1.3 2006/08/30 22:15:25 oliverschmidt Exp $ * */ @@ -163,8 +163,11 @@ draw_widget(struct ctk_widget *w, 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]; + } revers(i == w->widget.textentry.xpos - xscroll); if(c == 0) { cputc(' ');