mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 09:54:18 +00:00
Use sizeof(type) instead of sizeof(variableName) when (de)serializing data (#1505)
* Use sizeof(type) instead of sizeof(variableName) when (de)serializing data * Less usage of sizeof(variableName) while (de)serializing
This commit is contained in:
committed by
GitHub
parent
c9b41e2db8
commit
2915aa014f
@@ -7,6 +7,8 @@
|
||||
DECOMP_SIZE_ASSERT(MxBitmap, 0x20);
|
||||
DECOMP_SIZE_ASSERT(MxBITMAPINFO, 0x428);
|
||||
|
||||
DECOMP_SIZE_ASSERT(BITMAPFILEHEADER, 0xe);
|
||||
|
||||
// GLOBAL: LEGO1 0x10102184
|
||||
// GLOBAL: BETA10 0x10203030
|
||||
MxU16 g_bitmapSignature = TWOCC('B', 'M');
|
||||
@@ -207,7 +209,7 @@ MxResult MxBitmap::LoadFile(HANDLE p_handle)
|
||||
MxLong size;
|
||||
DWORD bytesRead;
|
||||
BITMAPFILEHEADER hdr;
|
||||
if (!ReadFile(p_handle, &hdr, sizeof(hdr), &bytesRead, NULL)) {
|
||||
if (!ReadFile(p_handle, &hdr, 14, &bytesRead, NULL)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user