diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 02a153899f..91d518e311 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2002-04-22 Angus Leeming + + * FormCitation.C (apply, input): ensure that the choice is always valid. + 2002-04-23 Juergen Spitzmueller * FormBibtex.C: Do not use a blank after the comma for multiple diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index 23f7994250..9dfbb49bb3 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -126,7 +126,7 @@ void FormCitation::apply() ControlCitation::getCiteStyles(); int const choice = - fl_get_choice(dialog_->choice_style) - 1; + std::max(0, fl_get_choice(dialog_->choice_style) - 1); bool const full = fl_get_button(dialog_->check_full_author_list); bool const force = @@ -429,7 +429,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long) currentCitekey = citekeys[0]; if (topCitekey != currentCitekey) { - int choice = fl_get_choice(dialog_->choice_style); + int choice = std::max(1, fl_get_choice(dialog_->choice_style)); fillChoice(dialog_.get(), controller().getCiteStrings(currentCitekey)); fl_set_choice(dialog_->choice_style, choice);