From 36cca23c1884de8d1925dc7777600121b96de0b5 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Wed, 30 Nov 2005 09:06:43 +0000 Subject: And now also allocates the correct amount git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8113 a1c6a512-1295-4272-9138-f99709370657 --- tools/bmp2rb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bmp2rb.c b/tools/bmp2rb.c index 48068b14a5..f7b92d0e6e 100644 --- a/tools/bmp2rb.c +++ b/tools/bmp2rb.c @@ -320,7 +320,7 @@ int transform_bitmap(const struct RGBQUAD *src, long width, long height, return 1; } - *dest = (unsigned short *)malloc(dst_w * dst_h); + *dest = (unsigned short *)malloc(dst_w * dst_h * sizeof(short)); if (*dest == NULL) { debugf("error - Out of memory.\n"); -- cgit v1.2.3