summaryrefslogtreecommitdiff
path: root/apps/recorder/bmp.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-25 15:19:34 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-25 15:19:34 +0000
commit0bddb7eb657ca58c74e926686fc8aab3a5c1019b (patch)
tree4153bb7d830fa9ff0ffe841470634618b59e7dd6 /apps/recorder/bmp.c
parent7b160108386df911dafcea71b35764c046435fff (diff)
downloadrockbox-0bddb7eb657ca58c74e926686fc8aab3a5c1019b.tar.gz
rockbox-0bddb7eb657ca58c74e926686fc8aab3a5c1019b.zip
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
Diffstat (limited to 'apps/recorder/bmp.c')
-rw-r--r--apps/recorder/bmp.c4
1 files changed, 4 insertions, 0 deletions
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,
597 totalsize = BM_SIZE(bm->width,bm->height,format,remote); 597 totalsize = BM_SIZE(bm->width,bm->height,format,remote);
598 598
599 if(return_size) 599 if(return_size)
600 {
601 if(resize)
602 totalsize += BM_SCALED_SIZE(bm->width, 0, 0, 0);
600 return totalsize; 603 return totalsize;
604 }
601 605
602 /* Check if this fits the buffer */ 606 /* Check if this fits the buffer */
603 if (totalsize > maxsize) { 607 if (totalsize > maxsize) {