diff --git a/components/rtgui/widgets/textbox.c b/components/rtgui/widgets/textbox.c index 6a7ca0e7a23315590ad9011a8aa01c2693d1beda..37e7f2c301e08ba2a6f427df38c5238c3f9c5405 100644 --- a/components/rtgui/widgets/textbox.c +++ b/components/rtgui/widgets/textbox.c @@ -10,6 +10,7 @@ * Change Logs: * Date Author Notes * 2009-10-16 Bernard first version + * 2011-01-224 Bernard fix backspace issue. */ #include #include @@ -166,7 +167,7 @@ static void rtgui_textbox_onkey(struct rtgui_textbox* box, struct rtgui_event_kb } else if (event->key == RTGUIK_BACKSPACE) { - if (box->position == length - 1) + if ((box->position == length - 1) && length != 1) { box->text[box->position] = '\0'; box->position --;