X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/4aed5deccace2e80cf7efa80ab451628c3ca2c3b..84050ee438ba1661047709f3c8b95b126ca10f93:/src/image.c diff --git a/src/image.c b/src/image.c index d583145..c8a7165 100644 --- a/src/image.c +++ b/src/image.c @@ -341,9 +341,10 @@ int lbximg_loadpalette(FILE *f, struct lbx_colour palette[static 256]) } palette[i] = (struct lbx_colour){ - .red = entry[1] << 2, - .green = entry[2] << 2, - .blue = entry[3] << 2, + .red = entry[1] << 2, + .green = entry[2] << 2, + .blue = entry[3] << 2, + .active = 1, }; } @@ -368,7 +369,6 @@ lbximg_getpalette(struct lbx_image *img, struct lbx_colour palette[static 256]) for (i = 0; i < img->palcount; i++) { rc = img->fops->read(entry, sizeof entry, img->f); - if (rc < sizeof entry) { goto readerr; } @@ -379,9 +379,10 @@ lbximg_getpalette(struct lbx_image *img, struct lbx_colour palette[static 256]) } palette[img->palstart + i] = (struct lbx_colour){ - .red = entry[1] << 2, - .green = entry[2] << 2, - .blue = entry[3] << 2, + .red = entry[1] << 2, + .green = entry[2] << 2, + .blue = entry[3] << 2, + .active = 1, }; }