diff options
Diffstat (limited to 'vcl/source/gdi/dibtools.cxx')
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index b061da93022d..54d17c83d47c 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1168,9 +1168,11 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess const & rAcc, bool bRLE4 ) nSaveIndex = nX - 1; bFound = false; - while( ( nX < nWidth ) && ( nCount < 256 ) - && ( cPix = rAcc.GetIndexFromData( pScanline, nX ) ) != cLast ) + while( ( nX < nWidth ) && ( nCount < 256 ) ) { + cPix = rAcc.GetIndexFromData( pScanline, nX ); + if (cPix == cLast) + break; nX++; nCount++; cLast = cPix; bFound = true; |