Division by zero (which criminally failed to give rise to any kind
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 17 Jul 2004 15:47:22 +0000 (15:47 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 17 Jul 2004 15:47:22 +0000 (15:47 +0000)
of signal!) was causing massive misplacement of the single line of
text on a one-line page in PS and PDF.

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

bk_paper.c

index b38060f..a8479c7 100644 (file)
@@ -1691,9 +1691,11 @@ static page_data *page_breaks(line_data *first, line_data *last,
            text += l->line_height;
 
            l->page = page;
-           l->ypos = text + space + head +
-               space * (float)page->first_line->vshortfall[n] /
-               page->first_line->space[n];
+           l->ypos = text + space + head;
+           if (page->first_line->space[n]) {
+               l->ypos += space * (float)page->first_line->vshortfall[n] /
+                   page->first_line->space[n];
+           }
 
            if (l == page->last_line)
                break;