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>
This commit is contained in:
parent
9ae7e33f28
commit
eb82959d66
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user