mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
Fixed gamer_handle_serialize/deserialize using the wrong sizes. (#2886)
This commit is contained in:
parent
cde9c23323
commit
1276c51c06
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user