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>
This commit is contained in:
parent
1c92bb87fe
commit
f5a624c9b9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user