]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
tools, bmp_logo: fix index from uint16_t to int to allow bigger logos
authorHeiko Schocher <hs@denx.de>
Sat, 3 Aug 2013 05:22:52 +0000 (07:22 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sat, 10 Aug 2013 08:48:00 +0000 (10:48 +0200)
when generating the bmp_logo_bitmap, the index is casted
as an uint16_t. So bigger logos as 65535 bytes are converted wrong
Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
tools/bmp_logo.c

index b2ad3d592768747ae0eed5bda884272a58bc47b7..2247adcc82ec1ebad5070eab61fb559991a731c3 100644 (file)
@@ -179,7 +179,7 @@ int main (int argc, char *argv[])
        printf("unsigned char bmp_logo_bitmap[] = {\n");
        for (i=(b->height-1)*b->width; i>=0; i-=b->width) {
                for (x = 0; x < b->width; x++) {
-                       b->data[(uint16_t) i + x] = (uint8_t) fgetc (fp) \
+                       b->data[i + x] = (uint8_t) fgetc(fp)
                                                + DEFAULT_CMAP_SIZE;
                }
        }