src/video/SDL_blit_1.c
changeset 91 e85e03f195b4
parent 0 74212992fb08
child 252 e8157fcb3114
     1.1 --- a/src/video/SDL_blit_1.c	Sat Jul 07 08:08:42 2001 +0000
     1.2 +++ b/src/video/SDL_blit_1.c	Sat Jul 07 20:20:17 2001 +0000
     1.3 @@ -137,7 +137,7 @@
     1.4  				dst += 4;
     1.5  			}
     1.6  			/* Get any leftovers */
     1.7 -			switch (width % 4) {
     1.8 +			switch (width & 3) {
     1.9  				case 3:
    1.10  					*(Uint16 *)dst = map[*src++];
    1.11  					dst += 2;
    1.12 @@ -169,7 +169,7 @@
    1.13  				dst += 4;
    1.14  			}
    1.15  			/* Get any leftovers */
    1.16 -			switch (width % 4) {
    1.17 +			switch (width & 3) {
    1.18  				case 3:
    1.19  					*(Uint16 *)dst = map[*src++];
    1.20  					dst += 2;
    1.21 @@ -266,7 +266,7 @@
    1.22  			*dst++ = map[*src++];
    1.23  			*dst++ = map[*src++];
    1.24  		}
    1.25 -		switch ( width % 4 ) {
    1.26 +		switch ( width & 3 ) {
    1.27  			case 3:
    1.28  				*dst++ = map[*src++];
    1.29  			case 2: