[trunk] Fixed invalid check in in tiff reading method (fixes issue 449)

This commit is contained in:
Matthieu Darbois 2014-12-11 20:21:26 +00:00
parent f095027329
commit c0710f557c
1 changed files with 1 additions and 1 deletions

View File

@ -2907,7 +2907,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
for(i = 0; i < ssize; i += step)
{
if((index < imgsize)&(index+1 < imgsize))
if((index < imgsize)&&(index+1 < imgsize))
{
image->comps[0].data[index] = ( dat8[i+0]<<4 ) |(dat8[i+1]>>4);
image->comps[1].data[index] = ((dat8[i+1]& 0x0f)<< 8) | dat8[i+2];