From 5dd78ba08f31f9aa3c13d4e05ad4478033f7f4e8 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Fri, 12 Aug 2011 20:22:30 +0200 Subject: Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)' Merge-request: 1299 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 81f0c44f6a4fd4cfa41af5d5b292008185bf3981) Conflicts: src/qt3support/itemviews/q3listbox.cpp src/qt3support/sql/q3datatable.cpp src/qt3support/text/q3richtext.cpp src/scripttools/debugging/qscriptcompletiontask.cpp src/scripttools/debugging/qscriptdebuggercodeview.cpp Change-Id: Ie70590e77e69fbb9b2322c48c3963fd9cbba19e6 Reviewed-on: http://codereview.qt-project.org/4581 Reviewed-by: Oswald Buddenhagen --- src/gui/painting/qpaintengine_x11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting/qpaintengine_x11.cpp') diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index 5f613ee001..62c1dacf05 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -2326,7 +2326,7 @@ static QPainterPath path_for_glyphs(const QVarLengthArray &glyphs, bool set = src[x >> 3] & (0x80 >> (x & 7)); if (set) { QRect r(xp + x, yp - h, 1, 1); - while (x < glyph->width-1 && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) { + while (x+1 < glyph->width && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) { ++x; r.setRight(r.right()+1); } -- cgit v1.2.3