[DESK.CPL]

- Fix wrong buffer usage
CORE-7300 #resolve

svn path=/trunk/; revision=59361
This commit is contained in:
Thomas Faber 2013-06-29 13:05:52 +00:00
parent 1380373ae4
commit a8ece748b5

View file

@ -30,12 +30,13 @@ InitFontSizeList(HWND hWnd)
0, KEY_READ, &hKey) == ERROR_SUCCESS)
for (;;)
{
TCHAR Buffer[LINE_LEN];
TCHAR Desc[LINE_LEN];
if (SetupGetStringField(&Context, 0, Desc, sizeof(Desc), NULL) &&
if (SetupGetStringField(&Context, 0, Buffer, sizeof(Buffer), NULL) &&
SetupGetIntField(&Context, 1, &ci))
{
_stprintf(Desc, _T("%s (%d DPI)"), Desc, ci);
_stprintf(Desc, _T("%s (%d DPI)"), Buffer, ci);
i = SendMessage(hFontSize, CB_ADDSTRING, 0, (LPARAM)Desc);
if (i != CB_ERR)
SendMessage(hFontSize, CB_SETITEMDATA, (WPARAM)i, (LPARAM)ci);