summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Bmp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/Bmp.cpp')
-rw-r--r--Stars45/Bmp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Stars45/Bmp.cpp b/Stars45/Bmp.cpp
index d191d4d..c6eb772 100644
--- a/Stars45/Bmp.cpp
+++ b/Stars45/Bmp.cpp
@@ -104,8 +104,8 @@ int BmpImage::Load(char *filename)
fread(&file_hdr.offset, sizeof(DWORD), 1, f);
fread(&info_hdr, BMP_INFO_HDR_SIZE, 1, f);
- if (info_hdr.width > 32768 || info_hdr.height > 32768 ||
- (info_hdr.width&3) || (info_hdr.height&3) ||
+ if (info_hdr.width > 32768 || info_hdr.height > 32768 ||
+ (info_hdr.width&3) || (info_hdr.height&3) ||
info_hdr.compression != 0) {
fclose(f);
return BMP_INVALID;
@@ -175,8 +175,8 @@ int BmpImage::LoadBuffer(unsigned char* buf, int len)
memcpy(&info_hdr, buf + BMP_FILE_HDR_SIZE, BMP_INFO_HDR_SIZE);
fp += BMP_FILE_HDR_SIZE + BMP_INFO_HDR_SIZE;
- if (info_hdr.width > 32768 || info_hdr.height > 32768 ||
- (info_hdr.width&3) || (info_hdr.height&3) ||
+ if (info_hdr.width > 32768 || info_hdr.height > 32768 ||
+ (info_hdr.width&3) || (info_hdr.height&3) ||
info_hdr.compression != 0) {
return BMP_INVALID;
}