2011-03-24 Paul Eggert <eggert@cs.ucla.edu>
+ * 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 <eggert@cs.ucla.edu>
TIFF *tiff;
int width, height, x, y, count;
uint32 *buf;
- int rc, rc2;
+ int rc;
XImagePtr ximg;
tiff_memory_source memsrc;
Lisp_Object image;
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,