From a5771345d9357d9d5ba65764c3aad3233df7fb6e Mon Sep 17 00:00:00 2001 From: Mikhail Svetkin Date: Thu, 5 Apr 2018 15:08:15 +0200 Subject: Fix integer overflow (1 << 31) On platforms where integer by default is int32(max is 2147483647) and (1 << 31) will be 2147483648 Change-Id: I59ccb5344d5ad7d085f01bbc7cebdf6152ff7755 Reviewed-by: Jesus Fernandez Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira (cherry picked from commit f5a624c9b94455bebd7eb8fabbb300c4793fe6df) --- src/gui/text/qfontdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 33dc27983a..e8b91cabe6 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2864,7 +2864,7 @@ Q_GUI_EXPORT QStringList qt_sort_families_by_writing_system(QChar::Script script uint order = i; if (testFamily == nullptr || (testFamily->writingSystems[writingSystem] & QtFontFamily::Supported) == 0) { - order |= 1 << 31; + order |= 1u << 31; } supported.insert(order, family); -- cgit v1.2.3