sizeof(char) is 1. By definition.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -890,9 +890,9 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits
|
||||
{
|
||||
if ( no_bits == 1 )
|
||||
{
|
||||
int linesize = ( the_width / (sizeof(unsigned char) * 8)) ;
|
||||
if ( the_width % (sizeof(unsigned char) * 8) )
|
||||
linesize += sizeof(unsigned char);
|
||||
int linesize = the_width / 8;
|
||||
if ( the_width % 8 )
|
||||
linesize++;
|
||||
|
||||
unsigned char* linestart = (unsigned char*) bits ;
|
||||
unsigned char* destptr = (unsigned char*) BeginRawAccess() ;
|
||||
|
||||
Reference in New Issue
Block a user