X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..742ff1e12fe845a79db772285dea63a227d867b7:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index dca81ce5fc..52dade70e4 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -366,7 +366,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE ptr[poffset] = temp; temp = (aWord & gmask) >> gshift; ptr[poffset + 1] = temp; - temp = (aWord & bmask) >> gshift; + temp = (aWord & bmask) >> bshift; ptr[poffset + 2] = temp; column++; } @@ -401,10 +401,10 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE return TRUE; } -bool wxBMPHandler::CanRead( wxInputStream& stream ) +bool wxBMPHandler::DoCanRead( wxInputStream& stream ) { unsigned char hdr[2]; - + stream.Read(&hdr, 2); stream.SeekI(-2, wxFromCurrent); return (hdr[0] == 'B' && hdr[1] == 'M');