Revision: 3626
http://svn.sourceforge.net/winmerge/?rev=3626&view=rev
Author: kimmov
Date: 2006-09-24 01:14:37 -0700 (Sun, 24 Sep 2006)
Log Message:
-----------
PATCH: [ 1564280 ] Stack corruption in LanguageSelect
Modified Paths:
--------------
trunk/Src/Changes.txt
trunk/Src/Common/LanguageSelect.cpp
Modified: trunk/Src/Changes.txt
===================================================================
--- trunk/Src/Changes.txt 2006-09-23 20:16:47 UTC (rev 3625)
+++ trunk/Src/Changes.txt 2006-09-24 08:14:37 UTC (rev 3626)
@@ -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
Couple of type fixes to CMoveConstraint
Src/Common: CMoveConstraint.cpp CMoveConstraint.h
Modified: trunk/Src/Common/LanguageSelect.cpp
===================================================================
--- trunk/Src/Common/LanguageSelect.cpp 2006-09-23 20:16:47 UTC (rev 3625)
+++ trunk/Src/Common/LanguageSelect.cpp 2006-09-24 08:14:37 UTC (rev 3626)
@@ -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.
|