BITMAPCOREHEADER bitmaps cannot be top-down bitmaps

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7116 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-08-18 22:54:26 +00:00
parent 79056544b0
commit 7100afa549
2 changed files with 6 additions and 4 deletions

View file

@ -27,11 +27,12 @@ bool GetTLBVersion(const TCHAR *filepath, DWORD &high, DWORD &low);
bool GetDLLVersion(const TCHAR *filepath, DWORD &high, DWORD &low);
typedef struct {
typedef struct GENERICIMAGEINFO {
UINT32 Width, Height;
INT32 RawHeight;
WORD BPP, Planes;
bool IsTopDownBitmap() const { return Height != (UINT32) RawHeight; }
GENERICIMAGEINFO() : RawHeight(0) {}
bool IsTopDownBitmap() const { return Height != (UINT32) RawHeight && RawHeight; }
} GENERICIMAGEINFO;
DWORD GetDIBHeaderInfo(const void*pData, size_t DataSize, GENERICIMAGEINFO&Info);
@ -47,7 +48,7 @@ inline WORD IsICOCURFile(const void*pData)
}
inline WORD IsICOCURFile(const void*pData, size_t DataSize)
{
return DataSize >= 6 ? IsICOCURFile(pData) : 0;
return DataSize > 6 ? IsICOCURFile(pData) : 0;
}
#endif //~ NSIS_BININTEROP_H