diff options
author | Dave Davenport <qball@gmpclient.org> | 2019-12-29 21:23:26 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2019-12-29 21:23:26 +0100 |
commit | de89be5c952fdef72f4a04b2a01596ca1f3390bb (patch) | |
tree | d69d0887c2f7d569dcf4aa4b3c2e08f419c7eae9 /source/widgets | |
parent | cd4607c77ca53e8fa9cc892672ac5350a686242f (diff) |
[Listview] Make str code more explicit.
Diffstat (limited to 'source/widgets')
-rw-r--r-- | source/widgets/listview.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/widgets/listview.c b/source/widgets/listview.c index adcd4d24..0c072b3c 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -290,8 +290,10 @@ static void update_element ( listview *lv, unsigned int tb, unsigned int index, if ( lv->boxes[tb].index ) { if ( index < 10 ) { - char str[2] = "0"; - str[0] = ((index+1)%10)+'0'; + char str[2] = { + ((index+1)%10)+'0', + '\0' + }; textbox_text( lv->boxes[tb].index, str ); } else { textbox_text( lv->boxes[tb].index, " " ); |