Piotr Caban : msvcrt: Update lc_category.wrefcount in __get_current_locale.

Alexandre Julliard julliard at winehq.org
Mon Nov 23 15:43:22 CST 2020


Module: wine
Branch: master
Commit: aa8891783046459508f91f47cc588b35ee8dea4e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=aa8891783046459508f91f47cc588b35ee8dea4e

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Nov 23 11:11:49 2020 +0100

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/locale.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index f557d10db1b..5971882229c 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -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)




More information about the wine-cvs mailing list