From: Paul Eggert Date: Thu, 24 Mar 2011 07:36:32 +0000 (-0700) Subject: * image.c (tiff_load): Fix off-by-one image count (Bug#8336). X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~460^2~15^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03d0a10961746346940115a5ff1779f4e7a455f7;p=emacs.git * image.c (tiff_load): Fix off-by-one image count (Bug#8336). --- diff --git a/src/ChangeLog b/src/ChangeLog index cdde9673fbd..998e2014c69 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-24 Paul Eggert + * image.c (tiff_load): Fix off-by-one image count (Bug#8336). + * xselect.c (x_check_property_data): Return correct size (Bug#8335). 2011-03-23 Paul Eggert diff --git a/src/image.c b/src/image.c index 7584f9bb2c0..695ac143fde 100644 --- a/src/image.c +++ b/src/image.c @@ -6754,7 +6754,7 @@ tiff_load (struct frame *f, struct image *img) TIFF *tiff; int width, height, x, y, count; uint32 *buf; - int rc, rc2; + int rc; XImagePtr ximg; tiff_memory_source memsrc; Lisp_Object image; @@ -6842,8 +6842,8 @@ tiff_load (struct frame *f, struct image *img) rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); /* Count the number of images in the file. */ - for (count = 1, rc2 = 1; rc2; count++) - rc2 = fn_TIFFSetDirectory (tiff, count); + for (count = 1; fn_TIFFSetDirectory (tiff, count); count++) + continue; if (count > 1) img->data.lisp_val = Fcons (Qcount,