Skip to content

Commit

Permalink
Clear buffer before calling GetLocaleInfo()
Browse files Browse the repository at this point in the history
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
  • Loading branch information
ch3cooli committed Mar 18, 2019
1 parent f9d7afd commit 9ecf0e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TortoiseProc/Settings/SetMainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ BOOL CSetMainPage::OnInitDialog()
DWORD loc = _wtoi(filename.Mid(static_cast<int>(wcslen(L"TortoiseProc"))));
if (loc == 0)
continue;
buf[0] = 0;
GetLocaleInfo(loc, LOCALE_SNATIVELANGNAME, buf, _countof(buf));
CString sLang = buf;
buf[0] = 0;
GetLocaleInfo(loc, LOCALE_SNATIVECTRYNAME, buf, _countof(buf));
if (buf[0])
{
Expand Down

0 comments on commit 9ecf0e5

Please sign in to comment.