diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-29 05:05:40 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-29 05:05:40 +0000 |
commit | 8f0740333be6cf191a9faa70f43e7b334f3fa66f (patch) | |
tree | 233c8302eb614d94a662864521d91de24f046631 /apps/recorder | |
parent | 236d52410f36a0a9202ca99c1865a8ff59895254 (diff) | |
download | rockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.tar.gz rockbox-8f0740333be6cf191a9faa70f43e7b334f3fa66f.zip |
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/recorder')
-rw-r--r-- | apps/recorder/bmp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 61d7430bb6..2e377df0ed 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c | |||
@@ -175,16 +175,16 @@ int read_bmp_file(char* filename, | |||
175 | PaddedWidth = (width * depth / 8 + 3) & ~3; | 175 | PaddedWidth = (width * depth / 8 + 3) & ~3; |
176 | 176 | ||
177 | #if LCD_DEPTH > 1 | 177 | #if LCD_DEPTH > 1 |
178 | if(format == FORMAT_ANY) { | 178 | if(format & FORMAT_ANY) { |
179 | if(depth == 1) | 179 | if(depth == 1) |
180 | format = FORMAT_MONO; | 180 | format = FORMAT_MONO; |
181 | else | 181 | else |
182 | format = FORMAT_NATIVE; | 182 | format = FORMAT_NATIVE; |
183 | } | 183 | } |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | /* PaddedHeight is for rockbox format. */ | 186 | /* PaddedHeight is for rockbox format. */ |
187 | if(format == FORMAT_MONO) { | 187 | if(format & FORMAT_MONO) { |
188 | PaddedHeight = (height + 7) / 8; | 188 | PaddedHeight = (height + 7) / 8; |
189 | totalsize = PaddedHeight * width; | 189 | totalsize = PaddedHeight * width; |
190 | } else { | 190 | } else { |
@@ -230,7 +230,7 @@ int read_bmp_file(char* filename, | |||
230 | lseek(fd, (off_t)readlong(&fh.OffBits), SEEK_SET); | 230 | lseek(fd, (off_t)readlong(&fh.OffBits), SEEK_SET); |
231 | 231 | ||
232 | #if LCD_DEPTH == 2 | 232 | #if LCD_DEPTH == 2 |
233 | if(format == FORMAT_NATIVE) | 233 | if(format & FORMAT_NATIVE) |
234 | memset(bitmap, 0, width * height / 4); | 234 | memset(bitmap, 0, width * height / 4); |
235 | #endif | 235 | #endif |
236 | 236 | ||
@@ -254,7 +254,7 @@ int read_bmp_file(char* filename, | |||
254 | switch(depth) { | 254 | switch(depth) { |
255 | case 1: | 255 | case 1: |
256 | #if LCD_DEPTH > 1 | 256 | #if LCD_DEPTH > 1 |
257 | if(format == FORMAT_MONO) { | 257 | if(format & FORMAT_MONO) { |
258 | #endif | 258 | #endif |
259 | /* Mono -> Mono */ | 259 | /* Mono -> Mono */ |
260 | for (col = 0; col < width; col++) { | 260 | for (col = 0; col < width; col++) { |
@@ -299,7 +299,7 @@ int read_bmp_file(char* filename, | |||
299 | case 24: | 299 | case 24: |
300 | p = bmpbuf; | 300 | p = bmpbuf; |
301 | #if LCD_DEPTH > 1 | 301 | #if LCD_DEPTH > 1 |
302 | if(format == FORMAT_MONO) { | 302 | if(format & FORMAT_MONO) { |
303 | #endif | 303 | #endif |
304 | /* RGB24 -> mono */ | 304 | /* RGB24 -> mono */ |
305 | for (col = 0; col < width; col++) { | 305 | for (col = 0; col < width; col++) { |