From f968bd665eb16d983a536dd61b27b8885457f574 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 22 Jun 2016 15:39:21 +0200 Subject: Fix regression in simple RGB16->RGB16 scaling The fix for QTBUG-35927 introduced a too strict check when scaling from a 16-bit source to a 16-bit destination. This patch changes the limit to adjust to source type. Task-number: QTBUG-54281 Change-Id: I6dd2bb8308f77520c00fa3ef6643a42462c5d351 Reviewed-by: Lars Knoll --- src/gui/painting/qblendfunctions_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting/qblendfunctions_p.h') diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h index 4435421cd0..a069f89db7 100644 --- a/src/gui/painting/qblendfunctions_p.h +++ b/src/gui/painting/qblendfunctions_p.h @@ -134,7 +134,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, if (yend < 0 || yend >= srch) --h; int xend = (basex + ix * (w - 1)) >> 16; - if (xend < 0 || xend >= (int)(sbpl/sizeof(quint32))) + if (xend < 0 || xend >= (int)(sbpl/sizeof(SRC))) --w; while (h--) { -- cgit v1.2.3