IMG_pcx.c
changeset 91 26b6d4a09dfd
parent 53 96b084473b47
child 95 7fcb46931afc
     1.1 --- a/IMG_pcx.c	Wed Jul 23 05:16:16 2003 +0000
     1.2 +++ b/IMG_pcx.c	Wed Aug 06 20:45:36 2003 +0000
     1.3 @@ -175,6 +175,9 @@
     1.4  					Uint8 byte = *src++;
     1.5  					for(j = 7; j >= 0; j--) {
     1.6  						unsigned bit = (byte >> j) & 1;
     1.7 +						/* skip padding bits */
     1.8 +						if (i * 8 + j >= width)
     1.9 +							continue;
    1.10  						row[x++] |= bit << plane;
    1.11  					}
    1.12  				}