From 0bddb7eb657ca58c74e926686fc8aab3a5c1019b Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Mon, 25 May 2009 15:19:34 +0000 Subject: [PATCH] Fix FORMAT_RETURN_SIZE in read_bmp_*() when scaling (thanks to Andrew Mahone) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21078 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/bmp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 4968d6221a..2968af35da 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -597,7 +597,11 @@ int read_bmp_fd(int fd, totalsize = BM_SIZE(bm->width,bm->height,format,remote); if(return_size) + { + if(resize) + totalsize += BM_SCALED_SIZE(bm->width, 0, 0, 0); return totalsize; + } /* Check if this fits the buffer */ if (totalsize > maxsize) {