ofz#3744 Undefined-shift

Change-Id: I4b3445c0ee50b9b50edba464da7ad61cda625d3e
Reviewed-on: https://gerrit.libreoffice.org/43755
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2017-10-24 11:57:03 +01:00
parent 48a4cf1021
commit da09cf2cb8

View File

@@ -666,7 +666,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
for (long y = 0; bIsValid && y < nHeight; ++y)
{
int nBitsLeft = 0;
for (long x = 0; bIsValid && x < nWidth; ++x)
for (long x = 0; x < nWidth; ++x)
{
if ( --nBitsLeft < 0 )
{
@@ -711,6 +711,8 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
}
}
}
if (!bIsValid)
break;
if ( nBitDepth == 1 )
pAcc->SetPixelIndex( y, x, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1 );
else