# HG changeset patch # User Grumpy7 # Date 1378866456 -7200 # Node ID 0016b08ab62168db504e15af349b5a16494cddc1 # Parent bb2378f5876705ce5e872505ecf6bd6b1aeb00e3 stru350::sub_451007_scale_image_bicubic - fixing a memory access bug diff -r bb2378f58767 -r 0016b08ab621 mm7_2.cpp --- 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);