4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 02:23:32 +08:00

fix textbox_set_value issue when text is "".

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@678 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2010-04-28 15:38:02 +00:00
parent 298a15f31a
commit 7df7dafe70

View File

@ -326,6 +326,8 @@ void rtgui_textbox_set_value(struct rtgui_textbox* box, const char* text)
if (box->line_length > rt_strlen(text) + 1)
{
rt_memcpy(box->text, text, rt_strlen(text) + 1);
/* set current position */
box->position = 0;
return;
}
else