fix possible array ref underrun (CID 1062 and a few dozen others)

svn path=/trunk/KDE/kdebase/workspace/; revision=531177
This commit is contained in:
Dirk Mueller 2006-04-18 16:33:11 +00:00
parent 86d79b7414
commit 85628ccd95

View file

@ -441,7 +441,7 @@ void RulesWidget::setRules( Rules* rules )
#undef COMBOBOX_FORCE_RULE #undef COMBOBOX_FORCE_RULE
#define GENERIC_RULE( var, func, Type, type, uimethod ) \ #define GENERIC_RULE( var, func, Type, type, uimethod ) \
if( enable_##var->isChecked()) \ if( enable_##var->isChecked() && rule_##var->currentIndex() >= 0) \
{ \ { \
rules->var##rule = combo_to_##type##_rule[ rule_##var->currentIndex() ]; \ rules->var##rule = combo_to_##type##_rule[ rule_##var->currentIndex() ]; \
rules->var = func( Ui_RulesWidgetBase::var->uimethod()); \ rules->var = func( Ui_RulesWidgetBase::var->uimethod()); \