diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
commit | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch) | |
tree | 326578f0505cbed07cfe60de530022822dc237ac /app/wlib/mswlib/mswlist.c | |
parent | 16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff) |
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/wlib/mswlib/mswlist.c')
-rw-r--r-- | app/wlib/mswlib/mswlist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/wlib/mswlib/mswlist.c b/app/wlib/mswlib/mswlist.c index 18fa92d..2453a5e 100644 --- a/app/wlib/mswlib/mswlist.c +++ b/app/wlib/mswlib/mswlist.c @@ -214,8 +214,10 @@ wIndex_t wListGetValues( } cnt = (int)SendMessage( bl->hWnd, msg, inx, (DWORD)(LPSTR)mswTmpBuff ); mswTmpBuff[cnt] = '\0'; - if (s) - strncpy( s, mswTmpBuff, siz ); + if (s) { + strncpy(s, mswTmpBuff, siz); + s[siz-1] = '\0'; + } if (bl->last >= 0) { ldp = (listData*)SendMessage( bl->hWnd, (bl->type==B_LIST?LB_GETITEMDATA:CB_GETITEMDATA), |