Author: cwittich
Date: Wed Sep 24 10:42:33 2008
New Revision: 36485
URL:
http://svn.reactos.org/svn/reactos?rev=36485&view=rev
Log:
check for value > 0 before using it as array index
Fix for Coverity error CID: 438
Modified:
trunk/reactos/dll/cpl/intl/currency.c
Modified: trunk/reactos/dll/cpl/intl/currency.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/currency.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/intl/currency.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/currency.c [iso-8859-1] Wed Sep 24 10:42:33 2008
@@ -413,7 +413,8 @@
(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;
}