diff --git a/src/ChangeLog b/src/ChangeLog index 08b99e4c7f..22ab20f2da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-11-29 Georg Baum + + * buffer_funcs.C (bufferErrors): prevent endless loop (bug 2121) + 2005-11-17 Michael Gerz * exporter.C: fix typo in text message diff --git a/src/buffer_funcs.C b/src/buffer_funcs.C index ef0b89ebfe..18e04b835d 100644 --- a/src/buffer_funcs.C +++ b/src/buffer_funcs.C @@ -215,13 +215,15 @@ void bufferErrors(Buffer const & buf, TeXErrors const & terr) 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));