Don't make assumptions on textentry contents beyond the first '\0'.
This commit is contained in:
parent
63c431a271
commit
8a8575b63c
1 changed files with 5 additions and 2 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: ctk-80col.c,v 1.1 2006/06/17 22:41:26 adamdunkels Exp $
|
||||
* $Id: ctk-80col.c,v 1.2 2006/09/09 23:09:59 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
|
@ -697,8 +697,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];
|
||||
}
|
||||
if(i == w->widget.textentry.xpos - xscroll) {
|
||||
revers(1);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue