check for value > 0 before using it as array index

Fix for Coverity error CID: 438

svn path=/trunk/; revision=36485
This commit is contained in:
Christoph von Wittich 2008-09-24 15:42:33 +00:00
parent 649b40cd13
commit d82ca9895d

View file

@ -413,7 +413,8 @@ SetCurrencyDigNum(HWND hwndDlg, LCID lcid)
(LPARAM)0);
/* Save number of digidts in field */
SetLocaleInfo(lcid, LOCALE_SMONGROUPING, szFieldDigNumSamples[nCurrSel]);
if (nCurrSel > 0)
SetLocaleInfo(lcid, LOCALE_SMONGROUPING, szFieldDigNumSamples[nCurrSel]);
return TRUE;
}