summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-06-15 10:16:00 +0200
committerCarlos Garcia Campos <cgarcia@igalia.com>2012-06-15 10:18:00 +0200
commita66b6a69ff903310ceb0f6618cbf94d480fbeae6 (patch)
tree86ea5a950ef2e16b91d79137052db7570d80310d
parentaca9c3d518049ff2eda537773186aa5b162d6f53 (diff)
Don't log and error in case sizeof(SplashColor) != 3
In poppler, sizeof(SplashColor) si always 4, while in xpdf depends on whether it's built with cmyk support. I think it's safe to simply check that sizeof(SplashColor) is at least 3.
-rw-r--r--lib/pdf/BitmapOutputDev.cc4
-rw-r--r--lib/pdf/FullBitmapOutputDev.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc
index 97c03f86..11fa842f 100644
--- a/lib/pdf/BitmapOutputDev.cc
+++ b/lib/pdf/BitmapOutputDev.cc
@@ -182,8 +182,8 @@ void BitmapOutputDev::flushBitmap()
int bitmap_width = rgbdev->getBitmapWidth();
int bitmap_height = rgbdev->getBitmapHeight();
- if(sizeof(SplashColor)!=3) {
- msg("<error> sizeof(SplashColor)!=3");
+ if(sizeof(SplashColor)<3) {
+ msg("<error> sizeof(SplashColor)<3");
return;
}
diff --git a/lib/pdf/FullBitmapOutputDev.cc b/lib/pdf/FullBitmapOutputDev.cc
index e05134c1..b9efc8e5 100644
--- a/lib/pdf/FullBitmapOutputDev.cc
+++ b/lib/pdf/FullBitmapOutputDev.cc
@@ -130,8 +130,8 @@ void FullBitmapOutputDev::flushBitmap()
if((xmax-xmin)<=0 || (ymax-ymin)<=0) // no bitmap, nothing to do
return;
- if(sizeof(SplashColor)!=3) {
- msg("<error> sizeof(SplashColor)!=3");
+ if(sizeof(SplashColor)<3) {
+ msg("<error> sizeof(SplashColor)<3");
return;
}
//xmin = ymin = 0;