summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-27 21:59:48 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-27 21:59:48 +0000
commit9b1c9db66e1c9c0fc55164ca6e7cf1b95399a7ca (patch)
tree1d81837ecca0b00a137c97011147e91fcb244af6
parent55a7a5c060e4f0af5753dd3d0e637e1f789a3e58 (diff)
downloadrockbox-9b1c9db66e1c9c0fc55164ca6e7cf1b95399a7ca.tar.gz
rockbox-9b1c9db66e1c9c0fc55164ca6e7cf1b95399a7ca.zip
Fix stupid padded width calculation bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8862 a1c6a512-1295-4272-9138-f99709370657
-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);