From 46475f6ab133357de9c7aabaf1364555c797d6d9 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sat, 4 Oct 2008 22:46:42 +0000 Subject: [PATCH] fixed problem introduced by the use of an enum for the subsampling factor. 2008-10-05 Sven Neumann * plug-ins/file-jpeg/jpeg.c (run): fixed problem introduced by the use of an enum for the subsampling factor. Fixes bug #554890. svn path=/trunk/; revision=27129 --- ChangeLog | 5 +++++ plug-ins/file-jpeg/jpeg.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1508b80d80..01355bffd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-05 Sven Neumann + + * plug-ins/file-jpeg/jpeg.c (run): fixed problem introduced by the + use of an enum for the subsampling factor. Fixes bug #554890. + 2008-10-04 Michael Natterer * plug-ins/common/web-browser.c: return errors via return_vals diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c index 2dfa0fbe39..ea0926839f 100644 --- a/plug-ins/file-jpeg/jpeg.c +++ b/plug-ins/file-jpeg/jpeg.c @@ -442,9 +442,11 @@ run (const gchar *name, } if (orig_subsmp == JPEG_SUPSAMPLING_1x1_1x1_1x1 || - (orig_subsmp > JPEG_SUPSAMPLING_1x1_1x1_1x1 && + ((gint) orig_subsmp > 0 && jsvals.subsmp == JPEG_SUPSAMPLING_1x1_1x1_1x1)) - jsvals.subsmp = orig_subsmp; + { + jsvals.subsmp = orig_subsmp; + } } break; }