Fixed gamer_handle_serialize/deserialize using the wrong sizes. (#2886)
This commit is contained in:
parent
4636ef8346
commit
21da47f3e5
@ -19,11 +19,11 @@
|
||||
|
||||
inline void gamer_handle_deserialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf)
|
||||
{
|
||||
if ((hnd.m_platform = buf.Read<uint8_t>(sizeof(hnd.m_platform))) != rage::rlPlatforms::PC)
|
||||
if ((hnd.m_platform = buf.Read<uint8_t>(sizeof(hnd.m_platform) * 8)) != rage::rlPlatforms::PC)
|
||||
return;
|
||||
|
||||
buf.ReadPeerId(&hnd.m_rockstar_id);
|
||||
hnd.m_padding = buf.Read<uint8_t>(sizeof(hnd.m_padding));
|
||||
hnd.m_padding = buf.Read<uint8_t>(sizeof(hnd.m_padding) * 8);
|
||||
}
|
||||
|
||||
inline bool is_kick_instruction(rage::datBitBuffer& buffer)
|
||||
|
@ -18,11 +18,11 @@ namespace
|
||||
{
|
||||
static void gamer_handle_serialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf)
|
||||
{
|
||||
buf.Write<uint8_t>(hnd.m_platform, sizeof(hnd.m_platform));
|
||||
buf.Write<uint8_t>(hnd.m_platform, sizeof(hnd.m_platform) * 8);
|
||||
if (hnd.m_platform == rage::rlPlatforms::PC)
|
||||
{
|
||||
buf.WriteQWord(hnd.m_rockstar_id, sizeof(hnd.m_rockstar_id));
|
||||
buf.Write<uint8_t>(hnd.m_padding, sizeof(hnd.m_padding));
|
||||
buf.WriteQWord(hnd.m_rockstar_id, sizeof(hnd.m_rockstar_id) * 8);
|
||||
buf.Write<uint8_t>(hnd.m_padding, sizeof(hnd.m_padding) * 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user