summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bmp2rb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bmp2rb.c b/tools/bmp2rb.c
index 16bf7d9633..8de6ab2b56 100644
--- a/tools/bmp2rb.c
+++ b/tools/bmp2rb.c
@@ -159,7 +159,7 @@ int read_bmp_file(char* filename,
159 159
160 width = readint(&fh.Width); 160 width = readint(&fh.Width);
161 height = readint(&fh.Height); 161 height = readint(&fh.Height);
162 padded_width = (width * depth / 8 + 3) & ~3; /* aligned 4-bytes boundaries */ 162 padded_width = ((width * depth + 31) / 8) & ~3; /* aligned 4-bytes boundaries */
163 163
164 size = padded_width * height; /* read this many bytes */ 164 size = padded_width * height; /* read this many bytes */
165 bmp = (unsigned char *)malloc(size); 165 bmp = (unsigned char *)malloc(size);