diff options
-rw-r--r-- | vcl/source/bitmap/bitmap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index caf589149382..ab83d18bd004 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -579,10 +579,10 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst, if( pSrcAcc && pDstAcc ) { - const int nSrcCount = pDstAcc->GetPaletteEntryCount(); + const int nSrcCount = pSrcAcc->GetPaletteEntryCount(); const int nDstCount = 1 << nDstBitCount; - for (int i = 0; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); ++i) + for (int i = 0; ( i < nSrcCount ) && ( nNextIndex < nDstCount ); ++i) { const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( static_cast<sal_uInt16>(i) ); |