diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index ed38d9fe64..e04d74c88d 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -435,7 +435,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap &bmp, memset( info, 0, sizeof( BITMAPINFOHEADER ) ); #if wxUSE_DRAWBITMAP_24BITS - int iBitsSize = ((width + 3 ) & ~3 ) * height * 3; + int iBitsSize = (((width * 3) + 3 ) & ~3 ) * height; #else int iBitsSize = ((width + 3 ) & ~3 ) * height ; #endif