Piotr Caban : msvcrt: Initialize all ctype fields.

Alexandre Julliard julliard at winehq.org
Tue Oct 18 12:56:29 CDT 2011


Module: wine
Branch: master
Commit: 0bb641ad59a279e9d2c9d0f2d402d0ab90479972
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0bb641ad59a279e9d2c9d0f2d402d0ab90479972

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Oct 18 15:22:46 2011 +0200

msvcrt: Initialize all ctype fields.

---

 dlls/msvcrt/locale.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index c64e3d9..b196cee 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -805,6 +805,9 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
         for(i=1; i<257; i++) {
             buf[0] = i-1;
 
+            /* builtin GetStringTypeA doesn't set output to 0 on invalid input */
+            loc->locinfo->ctype1[i] = 0;
+
             GetStringTypeA(lcid[MSVCRT_LC_CTYPE], CT_CTYPE1, buf,
                     1, loc->locinfo->ctype1+i);
         }




More information about the wine-cvs mailing list