From b23c57e12a982e500c7652086223398f57dc08bd Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Mon, 22 Sep 2014 14:39:08 -0700 Subject: [PATCH] Fix segfault in TestFileJpeg.test_quality_keep on win-amd64 --- libImaging/JpegEncode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libImaging/JpegEncode.c b/libImaging/JpegEncode.c index 711b201e0..dcb2e1151 100644 --- a/libImaging/JpegEncode.c +++ b/libImaging/JpegEncode.c @@ -151,7 +151,7 @@ ImagingJpegEncode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes) if (context->quality > 0) { quality = context->quality; } - for (i = 0; i < sizeof(context->qtables)/sizeof(unsigned int); i++) { + for (i = 0; i < sizeof(context->qtables)/sizeof(unsigned int *); i++) { // TODO: Should add support for none baseline jpeg_add_quant_table(&context->cinfo, i, context->qtables[i], quality, TRUE);