From 5a9e917a600eb47dd420f5efd2d52005b68a151c Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Wed, 10 Jul 2013 12:53:05 +0200 Subject: [PATCH] WINTERMUTE: Fix operator precedence in scale() --- engines/wintermute/graphics/transparent_surface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp index a0d472389fb..e20f97b1161 100644 --- a/engines/wintermute/graphics/transparent_surface.cpp +++ b/engines/wintermute/graphics/transparent_surface.cpp @@ -584,8 +584,8 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight) int projY; for (int y = 0; y < dstH; y++) { for (int x = 0; x < dstW; x++) { - projX = x / dstW * srcW; - projY = y / dstH * srcH; + projX = x / (float)dstW * srcW; + projY = y / (float)dstH * srcH; copyPixelNearestNeighbor(projX, projY, x, y, srcRect, dstRect, this, target); } }