The attached patch fixes an endless loop. See
http://bugzilla.lyx.org/show_bug.cgi?id=2121 for details.
OK to commit?
Georg
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2330
diff -u -p -r1.2330 ChangeLog
--- src/ChangeLog 28 Nov 2005 18:58:15 -0000 1.2330
+++ src/ChangeLog 29 Nov 2005 08:05:58 -0000
@@ -1,3 +1,7 @@
+2005-11-29 Georg Baum <[EMAIL PROTECTED]>
+
+ * buffer_funcs.C (bufferErrors): prevent endless loop (bug 2121)
+
2005-11-17 Michael Gerz <[EMAIL PROTECTED]>
* exporter.C: fix typo in text message
Index: src/buffer_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer_funcs.C,v
retrieving revision 1.34
diff -u -p -r1.34 buffer_funcs.C
--- src/buffer_funcs.C 9 Sep 2005 14:52:55 -0000 1.34
+++ src/buffer_funcs.C 29 Nov 2005 08:05:58 -0000
@@ -215,13 +219,15 @@ void bufferErrors(Buffer const & buf, Te
int id_start = -1;
int pos_start = -1;
int errorrow = cit->error_in_line;
- buf.texrow().getIdFromRow(errorrow, id_start, pos_start);
+ bool found = buf.texrow().getIdFromRow(errorrow, id_start,
+ pos_start);
int id_end = -1;
int pos_end = -1;
do {
++errorrow;
- buf.texrow().getIdFromRow(errorrow, id_end, pos_end);
- } while (id_start == id_end && pos_start == pos_end);
+ found = buf.texrow().getIdFromRow(errorrow, id_end,
+ pos_end);
+ } while (found && id_start == id_end && pos_start == pos_end);
buf.error(ErrorItem(cit->error_desc, cit->error_text,
id_start, pos_start, pos_end));