Kaydet (Commit) 11cc9bdc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid UBSan "left shift of 65536 by 16 places cannot be represented...

...in type 'int'" warning when constructing an XML_TOKEN_MAP_END instance, whose
nPrefixKey is 0xffffU.  Problem got introduced with
41b3fd8c "Make SvXMLTokenMap compatible with
FastTokens", the intent was presumably to make the shifted value of

  ( nPrefixKey + 1 ) << 16

be zero in that case.

Change-Id: I0b83a03198a44e54077899e4484634286d06cdcc
üst d0f83612
......@@ -44,7 +44,7 @@ struct SvXMLTokenMapEntry
nPrefixKey( nPrefix ),
eLocalName( eName ),
nToken( nTok ),
nFastToken( ( nPrefixKey + 1 ) << 16 | eLocalName )
nFastToken( sal_uInt32( nPrefixKey + 1 ) << 16 | eLocalName )
{
if ( nFastTok ) // alternative value for duplicate/dummy tokens
nFastToken = nFastTok;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment