From d5a69afa5a92f473831644eb9a9026f25b81e5c6 Mon Sep 17 00:00:00 2001 From: DRC Date: Fri, 25 Feb 2011 02:13:07 +0000 Subject: [PATCH] Fix the buffer size regression test so that it generates the intended pixel patterns git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@450 632fc199-4ca6-4c93-a231-07263d6284db --- jpegut.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jpegut.c b/jpegut.c index ea58bb49..458a6794 100644 --- a/jpegut.c +++ b/jpegut.c @@ -547,9 +547,9 @@ void dotest1(void) { bmpbuf[i2*4]=pixels[i2%9][2]; bmpbuf[i2*4+1]=pixels[i2%9][1]; - bmpbuf[i2*2+2]=pixels[i2%9][0]; + bmpbuf[i2*4+2]=pixels[i2%9][0]; } - _catch(tjCompress(hnd, bmpbuf, i, i*4, j, 4, + _catch(tjCompress(hnd, bmpbuf, i, 0, j, 4, jpgbuf, &size, TJ_444, 100, TJ_BGR)); free(bmpbuf); bmpbuf=NULL; free(jpgbuf); jpgbuf=NULL; @@ -558,12 +558,12 @@ void dotest1(void) { printf("Memory allocation failure\n"); bailout(); } - for(i2=0; i2