[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Wed Jun 11 23:31:40 PDT 2014


 vcl/source/gdi/bmpfast.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9885c35ddb9188e5b1549edf8697f6946232f7d3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 12 08:31:01 2014 +0200

    Avoid undefined left shift of negative value
    
    Change-Id: I6496a16c4d6791af43a67dae57b9ee218c3444fe

diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index dc907e5..b81a6c0 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -273,7 +273,7 @@ inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
 {
     if( !nAlphaVal )
         ImplConvertPixel( rDst, rSrc );
-    else if( nAlphaVal != ~(~0 << ALPHABITS) )
+    else if( nAlphaVal != ~(~0U << ALPHABITS) )
     {
         static const unsigned nAlphaShift = (ALPHABITS > 8) ? 8 : ALPHABITS;
         if( ALPHABITS > nAlphaShift )


More information about the Libreoffice-commits mailing list