From 2f31bbd9ccd4d6e7e6ed1dd89ab5648f69a2e8b4 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 4 Mar 2013 10:02:56 +0200 Subject: [PATCH] Fix potential issue in QTBF itemization code Since 5.0, script is QChar::Script which isn't of 1:1 mapping to HB_Script Change-Id: I2d88f929d7d3c3c994076a4e92ea22370962c41c Reviewed-by: Lars Knoll --- src/corelib/tools/qunicodetools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qunicodetools.cpp b/src/corelib/tools/qunicodetools.cpp index 0181e765f7..01aa1c4d52 100644 --- a/src/corelib/tools/qunicodetools.cpp +++ b/src/corelib/tools/qunicodetools.cpp @@ -611,7 +611,7 @@ Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length, scriptItems.reserve(numItems); int start = 0; for (int i = start + 1; i < numItems; ++i) { - if (items[i].script == items[start].script) + if (script_to_hbscript(items[i].script) == script_to_hbscript(items[start].script)) continue; HB_ScriptItem item; item.pos = items[start].position;