Mercurial > mm7
changeset 1600:0016b08ab621
stru350::sub_451007_scale_image_bicubic - fixing a memory access bug
author | Grumpy7 |
---|---|
date | Wed, 11 Sep 2013 04:27:36 +0200 |
parents | bb2378f58767 |
children | 5ac59bcb68e9 |
files | mm7_2.cpp |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_2.cpp Tue Sep 10 08:31:04 2013 +0200 +++ b/mm7_2.cpp Wed Sep 11 04:27:36 2013 +0200 @@ -923,6 +923,7 @@ v231 = 0; if ( dstHeight <= 0 ) return result; + do { for (int counter = 0; counter < dstWidth; counter++) @@ -948,11 +949,11 @@ for(int i = 0; i < ratioDiff; i++) { if(field0value == 32) - v21 = _450FB1((int)v175[i]); + v21 = _450FB1(((int*)v175)[i]); else if(field0value == 16) - v21 = _450FB1((_WORD)v175[i]); + v21 = _450FB1(((_WORD*)v175)[i]); else - v21 = _450FB1((unsigned __int8)v175[i]); + v21 = _450FB1(((unsigned __int8*)v175)[i]); v240 += ((unsigned int)v21 >> 24); a6b += BYTE2(v21); v252 += BYTE1(v21);