>>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>>>>> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:
Andre> Looks like the spurious crash we've seen lately (I posted a
Andre> backtrace yesterday or so). I think it's some corruption early
Andre> in the process...

Jean-Marc> What about this patch? Lars?

I found a second occurence of this bad index. Here is an updated
patch.

Andre, do you still see the same problem? It is surprising because it
says that dialog_->template_choice is not a choice object and I do not
see what could cause that.

JMarc

Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.575
diff -u -p -r1.575 ChangeLog
--- src/frontends/xforms/ChangeLog	23 Oct 2002 13:15:32 -0000	1.575
+++ src/frontends/xforms/ChangeLog	23 Oct 2002 16:26:06 -0000
@@ -1,3 +1,8 @@
+2002-10-23  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* FormExternal.C (apply): 
+	(input): fix an off-by-one index (causing a crash)
+
 2002-10-23  Angus Leeming  <[EMAIL PROTECTED]>
 
 	* checkedwidgets.C (setWidget): Don't set icol2 to alert_col when
Index: src/frontends/xforms/FormExternal.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormExternal.C,v
retrieving revision 1.21
diff -u -p -r1.21 FormExternal.C
--- src/frontends/xforms/FormExternal.C	5 Sep 2002 15:14:22 -0000	1.21
+++ src/frontends/xforms/FormExternal.C	23 Oct 2002 16:26:06 -0000
@@ -41,7 +41,7 @@ void FormExternal::apply()
 	controller().params().parameters =
 		fl_get_input(dialog_->input_parameters);
 
-	int const choice = fl_get_choice(dialog_->choice_template);
+	int const choice = fl_get_choice(dialog_->choice_template) - 1;
 	controller().params().templ = controller().getTemplate(choice);
 }
 
@@ -93,7 +93,7 @@ ButtonPolicy::SMInput FormExternal::inpu
 	if (ob == dialog_->choice_template) {
 
 		// set to the chosen template
-		int const choice = fl_get_choice(dialog_->choice_template);
+		int const choice = fl_get_choice(dialog_->choice_template) - 1;
 		controller().params().templ = controller().getTemplate(choice);
 
 		updateComboChange();

Reply via email to