msvcrt: Update lc_category.wrefcount in __get_current_locale.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50163
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-11-23 11:11:49 +01:00 committed by Alexandre Julliard
parent bedfb9cae2
commit aa88917830
1 changed files with 4 additions and 0 deletions

View File

@ -1155,7 +1155,11 @@ MSVCRT__locale_t CDECL get_current_locale_noalloc(MSVCRT__locale_t locale)
InterlockedIncrement(&locale->locinfo->refcount);
for(i=MSVCRT_LC_MIN+1; i<=MSVCRT_LC_MAX; i++)
{
InterlockedIncrement(locale->locinfo->lc_category[i].refcount);
if(locale->locinfo->lc_category[i].wrefcount)
InterlockedIncrement(locale->locinfo->lc_category[i].wrefcount);
}
if(locale->locinfo->lconv_intl_refcount)
InterlockedIncrement(locale->locinfo->lconv_intl_refcount);
if(locale->locinfo->lconv_num_refcount)