kernel32: Return proper char count in get_registry_locale_info.

This commit is contained in:
Sebastian Lackner 2014-12-16 04:10:34 +01:00 committed by Alexandre Julliard
parent 46d06eb431
commit 8826ba1bc8
1 changed files with 3 additions and 1 deletions

View File

@ -1206,7 +1206,9 @@ static INT get_registry_locale_info( struct registry_value *registry_value, LPWS
{
if (status == STATUS_BUFFER_OVERFLOW && !buffer)
{
ret = (size - info_size) / sizeof(WCHAR) + 1;
ret = (size - info_size) / sizeof(WCHAR);
if (!ret || ((WCHAR *)&info->Data)[ret-1])
ret++;
}
else if (status == STATUS_OBJECT_NAME_NOT_FOUND)
{