fix format

This commit is contained in:
Misha 2023-12-17 09:28:14 -05:00
parent 8b31be1320
commit 8bee9cf71e
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
2 changed files with 10 additions and 11 deletions

View File

@ -53,11 +53,11 @@ class MxDSChunk : public MxCore {
}
private:
MxU16 m_flags; // 0x8
MxU16 m_flags; // 0x8
undefined4 m_objectid; // 0xc
MxLong m_time; // 0x10
MxU32 m_length; // 0x14
MxU8* m_data; // 0x18
MxLong m_time; // 0x10
MxU32 m_length; // 0x14
MxU8* m_data; // 0x18
};
#endif // MXDSCHUNK_H

View File

@ -32,14 +32,13 @@ MxResult MxStreamChunk::ReadChunk(MxDSBuffer* p_buffer, MxU8* p_chunkData)
MxU32 MxStreamChunk::ReadChunkHeader(MxU8* p_chunkData)
{
MxU32 headersize = 0;
if(p_chunkData)
{
SetFlags(*(MxU16*)p_chunkData);
SetObjectId(*(MxU32*)(p_chunkData + 2));
SetTime(*(MxLong*)(p_chunkData + 6));
SetLength(*(MxU32*)(p_chunkData + 10));
if (p_chunkData) {
SetFlags(*(MxU16*) p_chunkData);
SetObjectId(*(MxU32*) (p_chunkData + 2));
SetTime(*(MxLong*) (p_chunkData + 6));
SetLength(*(MxU32*) (p_chunkData + 10));
SetData(p_chunkData + 14);
headersize = (MxU32)(p_chunkData + 14) - (MxU32)p_chunkData;
headersize = (MxU32) (p_chunkData + 14) - (MxU32) p_chunkData;
}
return headersize;
}