Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-05-20 18:20:30 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-05-20 18:20:30 (GMT)
commitd8e314a2f10f0fb949f4da48042d12dbdb5383b4 (patch)
tree9302770da2af434a6c032b2d0e5ba83fa36d6ef9 /backend
parentf73ef450f00bd6e8d89d4a102d7cb8447c67c8f1 (diff)
[pdf] Fix double to int conversion in thumbnails_get_dimensions
Fixes bgo#581524.
Diffstat (limited to 'backend')
-rw-r--r--backend/pdf/ev-poppler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 24d002e..f6bce09 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -1479,9 +1479,9 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail
poppler_page_get_size (POPPLER_PAGE (rc->page->backend_page),
&page_width, &page_height);
- *width = (gint) MAX (page_width * rc->scale, 1);
- *height = (gint) MAX (page_height * rc->scale, 1);
-
+ *width = MAX ((gint)(page_width * rc->scale + 0.5), 1);
+ *height = MAX ((gint)(page_height * rc->scale + 0.5), 1);
+
if (rc->rotation == 90 || rc->rotation == 270) {
gint temp;