]> git.draconx.ca Git - liblbx.git/blobdiff - src/lbximg.c
Trivial manual fixes.
[liblbx.git] / src / lbximg.c
index 5beaaaeb8f6af6275fa9a16f713fbfa52bd216f4..f9975063ff20804d6f0ccbeef6b6f4ce1070e265 100644 (file)
@@ -191,10 +191,10 @@ int parserange(unsigned frames, char *str, unsigned char *bits)
        return 0;
 }
 
-int output(unsigned int frameno, const struct img_format *fmt,
-           unsigned char *pixels, unsigned char *pixel_mask,
-           unsigned int width, unsigned int height,
-           struct lbx_colour palette[static 256])
+static int output(unsigned int frameno, const struct img_format *fmt,
+                  unsigned char *pixels, unsigned char *pixel_mask,
+                  unsigned int width, unsigned int height,
+                  struct lbx_colour *palette)
 {
        char name[strlen(outname) + sizeof ".65535.png"];
        FILE *of;
@@ -227,7 +227,7 @@ int output(unsigned int frameno, const struct img_format *fmt,
        return 0;
 }
 
-static int loadoverride(FILE *f, struct lbx_colour palette[static 256])
+static int loadoverride(FILE *f, struct lbx_colour *palette)
 {
        struct lbx_image *img;
        int rc, ret = 0;
@@ -376,7 +376,7 @@ decode(struct lbx_image *img, FILE *palf, FILE *override, int fmt, char **argv)
        assert(fmt >= 0 && fmt < sizeof formats / sizeof formats[0]);
 
        npixels = img->width;
-       if (img->height && npixels >= SIZE_MAX / img->height) {
+       if (img->height && npixels >= (size_t)-1 / img->height) {
                tool_err(-1, "image too large");
                goto err;
        }