Skip to content

Commit

Permalink
DSU: Fix bad crc calculate (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
schspa committed Oct 25, 2022
1 parent 643ac57 commit 88f63ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/input/api/DSU/DSUMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ void MessageHeader::Finalize(size_t size)

uint32_t MessageHeader::CRC32(size_t size) const
{
return crc32_calc(this, size);
uint32_t tmp, tmp2;

tmp = m_crc32;
m_crc32 = 0;
tmp2 = crc32_calc(this, size);
m_crc32 = tmp;

return tmp2;
}

bool MessageHeader::IsClientMessage() const { return m_magic == kMagicClient; }
Expand Down

0 comments on commit 88f63ca

Please sign in to comment.