strcpynAtoW takes number of characters, not bytes
Dmitry Timoshkov
dmitry at baikal.ru
Mon Sep 12 05:12:38 CDT 2005
Hello,
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
strcpynAtoW takes number of characters, not bytes.
--- cvs/hq/wine/dlls/kernel/locale.c 2005-06-21 16:39:58.000000000 +0900
+++ wine/dlls/kernel/locale.c 2005-09-12 16:19:35.000000000 +0900
@@ -425,9 +425,9 @@ static LANGID get_language_id(LPCSTR Lan
}
l_data.n_found = 0;
- strcpynAtoW(l_data.lang, Lang, sizeof(l_data.lang));
+ strcpynAtoW(l_data.lang, Lang, sizeof(l_data.lang)/sizeof(WCHAR));
- if (Country) strcpynAtoW(l_data.country, Country, sizeof(l_data.country));
+ if (Country) strcpynAtoW(l_data.country, Country, sizeof(l_data.country)/sizeof(WCHAR));
else l_data.country[0] = 0;
EnumResourceLanguagesW(kernel32_handle, (LPCWSTR)RT_STRING, (LPCWSTR)LOCALE_ILANGUAGE,
More information about the wine-patches
mailing list