Fix Valgrind issue

It was complaining of an invalid read size because it was accessing
bytes after the pixels buffer.
This commit is contained in:
Daniel Zaoui 2018-05-18 17:20:56 +03:00
parent 667171d1d9
commit a1341ac74c
1 changed files with 2 additions and 2 deletions

View File

@ -339,8 +339,8 @@ exactness_image_compare(Exactness_Image *img1, Exactness_Image *img2, Exactness_
{
for (h = 0; h < hO; h++)
{
Eina_Bool valid1 = img1 ? w <= w1 && h <= h1 : EINA_FALSE;
Eina_Bool valid2 = img2 ? w <= w2 && h <= h2 : EINA_FALSE;
Eina_Bool valid1 = img1 ? w < w1 && h < h1 : EINA_FALSE;
Eina_Bool valid2 = img2 ? w < w2 && h < h2 : EINA_FALSE;
int px1 = valid1 ? pxs1[h * w1 + w] : 0;
int px2 = valid2 ? pxs2[h * w2 + w] : 0;
int r1 = (px1 & 0x00FF0000) >> 16;