aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-03-06 11:28:10 +0000
committerEugene Sandulenko2005-03-06 11:28:10 +0000
commite4bd258fd6c86b76e5f1a71a4c47d8acd3a04c52 (patch)
tree33c33044e605cb851079aed896ea6525334a0959
parentd65d95859351cdf061c36e1e11ffa8db95a25138 (diff)
downloadscummvm-rg350-e4bd258fd6c86b76e5f1a71a4c47d8acd3a04c52.tar.gz
scummvm-rg350-e4bd258fd6c86b76e5f1a71a4c47d8acd3a04c52.tar.bz2
scummvm-rg350-e4bd258fd6c86b76e5f1a71a4c47d8acd3a04c52.zip
Fix bug which led to an endless loop if 1.5x scaler is fed with odd value.
svn-id: r17003
-rw-r--r--common/scaler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp
index 30de3a7ae6..084c1849f7 100644
--- a/common/scaler.cpp
+++ b/common/scaler.cpp
@@ -184,7 +184,7 @@ void Normal1o5xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uin
const uint32 srcPitch2 = srcPitch * 2;
assert(((int)dstPtr & 1) == 0);
- while (height) {
+ while (height > 0) {
r = dstPtr;
for (int i = 0; i < width; i += 2, r += 6) {
uint16 color0 = *(((const uint16 *)srcPtr) + i);