Use of \lcont in the document preamble caused an assertion failure.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Jan 2009 18:34:41 +0000 (18:34 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Jan 2009 18:34:41 +0000 (18:34 +0000)
Fix it.

git-svn-id: svn://svn.tartarus.org/sgt/halibut@8421 cda61777-01e9-0310-a592-d414129be87e

bk_text.c

index 1a1796e..c8ded79 100644 (file)
--- a/bk_text.c
+++ b/bk_text.c
@@ -311,7 +311,7 @@ void text_backend(paragraph *sourceform, keywordlist *keywords,
     word spaceword;
     textfile tf;
     wchar_t *prefixextra;
-    int nesting, nestindent;
+    int nesting, nestbase, nestindent;
     int indentb, indenta;
 
     IGNORE(unused);
@@ -338,7 +338,8 @@ void text_backend(paragraph *sourceform, keywordlist *keywords,
                         conf.atitle, conf.indent, conf.width, &conf);
 
     nestindent = conf.listindentbefore + conf.listindentafter;
-    nesting = (conf.indent_preambles ? 0 : -conf.indent);
+    nestbase = (conf.indent_preambles ? 0 : -conf.indent);
+    nesting = nestbase;
 
     /* Do the main document */
     for (p = sourceform; p; p = p->next) switch (p->type) {
@@ -356,7 +357,7 @@ void text_backend(paragraph *sourceform, keywordlist *keywords,
        break;
       case para_LcontPop:
        nesting -= nestindent;
-       assert(nesting >= 0);
+       assert(nesting >= nestbase);
        break;
 
        /*