diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-05-02 10:44:37 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-05-04 06:00:39 +0000 |
commit | eb82959d6688f9e58be4b67670afba3649f1f799 (patch) | |
tree | f29b36ecc19e2c32d4c242b7dc514e3a3aa5b6dc /src/gui/text/qplatformfontdatabase.cpp | |
parent | 9ae7e33f28f972ec566d62ab110e173ebe933520 (diff) |
Fix undefined behavior in left-shifting into negative
It's undefined behavior to left or right-shift a signed integer such
that the sign changes. Since SymbolCsbBit is 31, make sure we use
unsigned numbers.
Found by ICC
qplatformfontdatabase.cpp(614): error #68: integer conversion resulted in a change of sign
Change-Id: Idf715b895bac4d56b4afffff13da78d294b1248e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qplatformfontdatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp index 5fa43948aa..502348a79a 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -611,7 +611,7 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q hasScript = true; //qDebug("font %s supports Korean", familyName.latin1()); } - if (codePageRange[0] & (1 << SymbolCsbBit)) { + if (codePageRange[0] & (1U << SymbolCsbBit)) { writingSystems = QSupportedWritingSystems(); hasScript = false; } |