Fix bug which led to an endless loop if 1.5x scaler is fed with odd value.

svn-id: r17003
This commit is contained in:
Eugene Sandulenko 2005-03-06 11:28:10 +00:00
parent d65d958593
commit e4bd258fd6

View file

@ -184,7 +184,7 @@ void Normal1o5xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uin
const uint32 srcPitch2 = srcPitch * 2; const uint32 srcPitch2 = srcPitch * 2;
assert(((int)dstPtr & 1) == 0); assert(((int)dstPtr & 1) == 0);
while (height) { while (height > 0) {
r = dstPtr; r = dstPtr;
for (int i = 0; i < width; i += 2, r += 6) { for (int i = 0; i < width; i += 2, r += 6) {
uint16 color0 = *(((const uint16 *)srcPtr) + i); uint16 color0 = *(((const uint16 *)srcPtr) + i);