diff options
Diffstat (limited to 'source/html/html-doc.c')
-rw-r--r-- | source/html/html-doc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/html/html-doc.c b/source/html/html-doc.c index c43c7f3c..98bb082a 100644 --- a/source/html/html-doc.c +++ b/source/html/html-doc.c @@ -56,8 +56,9 @@ static int htdoc_count_pages(fz_context *ctx, fz_document *doc_) { html_document *doc = (html_document*)doc_; - int count = ceilf(doc->html->root->b / doc->html->page_h); - return count; + if (doc->html->root->b > 0) + return ceilf(doc->html->root->b / doc->html->page_h); + return 1; } static void |