Index: dll/cpl/intl/numbers.c =================================================================== --- dll/cpl/intl/numbers.c (revision 74931) +++ dll/cpl/intl/numbers.c (working copy) @@ -286,22 +286,22 @@ L","); if (pszResultStr != NULL) { - wcscpy(szNewSample, pszResultStr); + wcsncpy(szNewSample, pszResultStr, MAX_SAMPLES_STR_SIZE); HeapFree(GetProcessHeap(), 0, pszResultStr); + + /* Replace standard negative sign to setted */ + pszResultStr = ReplaceSubStr(szNewSample, + pGlobalData->szNumNegativeSign, + L"-"); + if (pszResultStr != NULL) + { + SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNNUMFORMAT, + CB_ADDSTRING, + 0, + (LPARAM)pszResultStr); + HeapFree(GetProcessHeap(), 0, pszResultStr); + } } - - /* Replace standard negative sign to setted */ - pszResultStr = ReplaceSubStr(szNewSample, - pGlobalData->szNumNegativeSign, - L"-"); - if (pszResultStr != NULL) - { - SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNNUMFORMAT, - CB_ADDSTRING, - 0, - (LPARAM)pszResultStr); - HeapFree(GetProcessHeap(), 0, pszResultStr); - } } /* Set current item to value from registry */