diff options
author | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2018-04-05 15:08:15 +0200 |
---|---|---|
committer | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2018-04-09 08:40:29 +0000 |
commit | f5a624c9b94455bebd7eb8fabbb300c4793fe6df (patch) | |
tree | 8c0c8c3d58542f16c74ac6bba879912185d379ee /src/gui/text/qfontdatabase.cpp | |
parent | 1c92bb87fe4d32265b3c6d33b6e548bd41635c15 (diff) |
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 <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 404a722e29..a4e5130937 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2889,7 +2889,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); |