Daniel Lehman : kernel32: Use ANSI code page if current thread locale has no code page.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:55 CST 2014


Module: wine
Branch: stable
Commit: 79137646a078c55afc4f91665c5e09f0a7824c7d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=79137646a078c55afc4f91665c5e09f0a7824c7d

Author: Daniel Lehman <dlehman at esri.com>
Date:   Thu Oct 31 11:03:18 2013 -0700

kernel32: Use ANSI code page if current thread locale has no code page.

(cherry picked from commit 37dad12971ba08df39f54dcde833a5ce70a98eda)

---

 dlls/kernel32/locale.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 9ddf078..22903d5 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -215,6 +215,7 @@ static const union cptable *get_codepage_table( unsigned int codepage )
     case CP_THREAD_ACP:
         if (NtCurrentTeb()->CurrentLocale == GetUserDefaultLCID()) return ansi_cptable;
         codepage = get_lcid_codepage( NtCurrentTeb()->CurrentLocale );
+        if (!codepage) return ansi_cptable;
         /* fall through */
     default:
         if (codepage == ansi_cptable->info.codepage) return ansi_cptable;




More information about the wine-cvs mailing list