Commit fea1a845 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Return the correct character count in DBCS locales.

parent 97551bce
......@@ -778,7 +778,13 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPARAM lParam, BOOL
if (HAS_STRINGS(descr))
{
if (!lParam)
return strlenW(descr->items[index].str);
{
DWORD len = strlenW(descr->items[index].str);
if( unicode )
return len;
return WideCharToMultiByte( CP_ACP, 0, descr->items[index].str, len,
NULL, 0, NULL, NULL );
}
TRACE("index %d (0x%04x) %s\n", index, index, debugstr_w(descr->items[index].str));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment