IMG_xcf.c
changeset 128 3ed445f2f4fd
parent 121 1bf9c0c87374
child 154 201cc5c1b373
     1.1 --- a/IMG_xcf.c	Sun Apr 30 04:53:56 2006 +0000
     1.2 +++ b/IMG_xcf.c	Sun Apr 30 06:18:38 2006 +0000
     1.3 @@ -315,7 +315,7 @@
     1.4        // unused var: int i;
     1.5  
     1.6        h->cm_num = prop.data.colormap.num;
     1.7 -      h->cm_map = (char *) malloc (sizeof (char) * 3 * h->cm_num);
     1.8 +      h->cm_map = (unsigned char *) malloc (sizeof (unsigned char) * 3 * h->cm_num);
     1.9        memcpy (h->cm_map, prop.data.colormap.cmap, 3*sizeof (char)*h->cm_num);
    1.10        free (prop.data.colormap.cmap);
    1.11      }
    1.12 @@ -453,7 +453,7 @@
    1.13  unsigned char * load_xcf_tile_none (SDL_RWops * src, Uint32 len, int bpp, int x, int y) {
    1.14    unsigned char * load;
    1.15  
    1.16 -  load = (char *) malloc (len); // expect this is okay
    1.17 +  load = (unsigned char *) malloc (len); // expect this is okay
    1.18    SDL_RWread (src, load, len, 1);
    1.19  
    1.20    return load;
    1.21 @@ -465,10 +465,10 @@
    1.22    int i, size, count, j, length;
    1.23    unsigned char val;
    1.24  
    1.25 -  t = load = (char *) malloc (len);
    1.26 +  t = load = (unsigned char *) malloc (len);
    1.27    reallen = SDL_RWread (src, t, 1, len);
    1.28  
    1.29 -  data = (char *) malloc (x*y*bpp);
    1.30 +  data = (unsigned char *) malloc (x*y*bpp);
    1.31    for (i = 0; i < bpp; i++) {
    1.32      d    = data + i;
    1.33      size = x*y;