Revision: 3627
http://svn.sourceforge.net/winmerge/?rev=3627&view=rev
Author: kimmov
Date: 2006-09-24 01:21:33 -0700 (Sun, 24 Sep 2006)
Log Message:
-----------
PATCH: [ 1564280 ] Stack corruption in LanguageSelect
Modified Paths:
--------------
branches/R2_6/Src/Changes.txt
branches/R2_6/Src/Common/LanguageSelect.cpp
Modified: branches/R2_6/Src/Changes.txt
===================================================================
--- branches/R2_6/Src/Changes.txt 2006-09-24 08:14:37 UTC (rev 3626)
+++ branches/R2_6/Src/Changes.txt 2006-09-24 08:21:33 UTC (rev 3627)
@@ -2,6 +2,10 @@
Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-09-24 Kimmo
+ PATCH: [ 1564280 ] Stack corruption in LanguageSelect
+ Src/Common: LanguageSelect.cpp
+
2006-09-23 Kimmo
Fix Visual C 6 compile by backouting (partly) patches:
- Fix 64-bit pointer truncation in SetWindowLongPtr call (the last I hope)
Modified: branches/R2_6/Src/Common/LanguageSelect.cpp
===================================================================
--- branches/R2_6/Src/Common/LanguageSelect.cpp 2006-09-24 08:14:37 UTC (rev 3626)
+++ branches/R2_6/Src/Common/LanguageSelect.cpp 2006-09-24 08:21:33 UTC (rev 3627)
@@ -817,14 +817,14 @@
static WORD
GetLangFromLocale(LCID lcid)
{
- TCHAR buff[8];
- if (GetLocaleInfo(lcid, LOCALE_IDEFAULTLANGUAGE, buff, countof(buff)))
- {
- LANGID langid = 0;
- if (1 == _stscanf(buff, _T("%x"), &langid) && langid)
- return langid;
- }
- return -1;
+ TCHAR buff[8] = {0};
+ if (GetLocaleInfo(lcid, LOCALE_IDEFAULTLANGUAGE, buff, countof(buff)))
+ {
+ int langID = 0;
+ if ((1 == _stscanf(buff, _T("%4x"), &langID)) && langID)
+ return (WORD)langID;
+ }
+ return (WORD)-1;
}
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|