Commit 03d0a109 authored by Paul Eggert's avatar Paul Eggert
Browse files

* image.c (tiff_load): Fix off-by-one image count (Bug#8336).

parent 44f730c8
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 <>
......@@ -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++)
if (count > 1)
img->data.lisp_val = Fcons (Qcount,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment