summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-29 05:05:40 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-29 05:05:40 +0000
commit8f0740333be6cf191a9faa70f43e7b334f3fa66f (patch)
tree233c8302eb614d94a662864521d91de24f046631 /apps
parent236d52410f36a0a9202ca99c1865a8ff59895254 (diff)
downloadrockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.zip
rockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.tar.gz
rockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.tar.bz2
rockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.tar.xz
Temporary fix for crashing when trying to enter the WPS, thanks to Adam Boot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8480 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/bmp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index 61d7430..2e377df 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -175,16 +175,16 @@ int read_bmp_file(char* filename,
PaddedWidth = (width * depth / 8 + 3) & ~3;
#if LCD_DEPTH > 1
- if(format == FORMAT_ANY) {
+ if(format & FORMAT_ANY) {
if(depth == 1)
format = FORMAT_MONO;
else
format = FORMAT_NATIVE;
}
#endif
-
+
/* PaddedHeight is for rockbox format. */
- if(format == FORMAT_MONO) {
+ if(format & FORMAT_MONO) {
PaddedHeight = (height + 7) / 8;
totalsize = PaddedHeight * width;
} else {
@@ -230,7 +230,7 @@ int read_bmp_file(char* filename,
lseek(fd, (off_t)readlong(&fh.OffBits), SEEK_SET);
#if LCD_DEPTH == 2
- if(format == FORMAT_NATIVE)
+ if(format & FORMAT_NATIVE)
memset(bitmap, 0, width * height / 4);
#endif
@@ -254,7 +254,7 @@ int read_bmp_file(char* filename,
switch(depth) {
case 1:
#if LCD_DEPTH > 1
- if(format == FORMAT_MONO) {
+ if(format & FORMAT_MONO) {
#endif
/* Mono -> Mono */
for (col = 0; col < width; col++) {
@@ -299,7 +299,7 @@ int read_bmp_file(char* filename,
case 24:
p = bmpbuf;
#if LCD_DEPTH > 1
- if(format == FORMAT_MONO) {
+ if(format & FORMAT_MONO) {
#endif
/* RGB24 -> mono */
for (col = 0; col < width; col++) {