]> git.draconx.ca Git - liblbx.git/blobdiff - src/lbximg.c
Use (size_t)-1 instead of SIZE_MAX.
[liblbx.git] / src / lbximg.c
index 80ffea597ee641684394f12ed229021e64a28d2c..f9975063ff20804d6f0ccbeef6b6f4ce1070e265 100644 (file)
@@ -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;
        }