Fix sizeof bug with font size list.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@315 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
harrybharry 2008-09-10 00:37:42 +00:00
parent adba68de00
commit f8d3d3e5de
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ void SharedParametersDialog::initControls()
_pBgColour[i]->display();
//for the font size combos
for(int j = 0 ; j < int(sizeof(fontSizeStrs))/3 ; j++)
for(int j = 0 ; j < int(sizeof(fontSizeStrs))/(3*sizeof(TCHAR)) ; j++)
{
::SendDlgItemMessage(_hSelf, _fontSizeCombo[i], CB_ADDSTRING, 0, (LPARAM)fontSizeStrs[j]);
}

View File

@ -96,7 +96,7 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
colourHooker.setColour(RGB(0xFF, 0x00, 0x00));
colourHooker.hookOn(_hStyleInfoStaticText);
for(int i = 0 ; i < sizeof(fontSizeStrs)/3 ; i++)
for(int i = 0 ; i < sizeof(fontSizeStrs)/(3*sizeof(TCHAR)) ; i++)
::SendMessage(_hFontSizeCombo, CB_ADDSTRING, 0, (LPARAM)fontSizeStrs[i]);
const std::vector<std::generic_string> & fontlist = (NppParameters::getInstance())->getFontList();