X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3897b707bd39c491c820849953431e4a5751fced..87df17a11b0017d31c09f767bd921abb27193bee:/src/msw/dib.cpp?ds=sidebyside diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 40531079da..a4db58f8df 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -159,9 +159,9 @@ WORD wxPaletteSize(VOID FAR * pv) NumColors = DibNumColors(lpbi); if (lpbi->biSize == sizeof(BITMAPCOREHEADER)) - return NumColors * sizeof(RGBTRIPLE); + return (WORD)(NumColors * sizeof(RGBTRIPLE)); else - return NumColors * sizeof(RGBQUAD); + return (WORD)(NumColors * sizeof(RGBQUAD)); } /**************************************************************************** @@ -528,7 +528,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette) } /* offset to the bits from start of DIB header */ - offBits = (WORD)lpbi->biSize + nNumColors * sizeof(RGBQUAD); + offBits = (WORD)(lpbi->biSize + nNumColors * sizeof(RGBQUAD)); if (bf.bfOffBits != 0L) { @@ -941,4 +941,3 @@ bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap) else return FALSE; } -