diff --git a/src/hooks/protections/receive_net_message.cpp b/src/hooks/protections/receive_net_message.cpp index 37b199af..4860435c 100644 --- a/src/hooks/protections/receive_net_message.cpp +++ b/src/hooks/protections/receive_net_message.cpp @@ -19,11 +19,11 @@ inline void gamer_handle_deserialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf) { - if ((hnd.m_platform = buf.Read(sizeof(hnd.m_platform))) != rage::rlPlatforms::PC) + if ((hnd.m_platform = buf.Read(sizeof(hnd.m_platform) * 8)) != rage::rlPlatforms::PC) return; buf.ReadPeerId(&hnd.m_rockstar_id); - hnd.m_padding = buf.Read(sizeof(hnd.m_padding)); + hnd.m_padding = buf.Read(sizeof(hnd.m_padding) * 8); } inline bool is_kick_instruction(rage::datBitBuffer& buffer) diff --git a/src/util/chat.hpp b/src/util/chat.hpp index 23eb53c0..a2997856 100644 --- a/src/util/chat.hpp +++ b/src/util/chat.hpp @@ -18,11 +18,11 @@ namespace { static void gamer_handle_serialize(rage::rlGamerHandle& hnd, rage::datBitBuffer& buf) { - buf.Write(hnd.m_platform, sizeof(hnd.m_platform)); + buf.Write(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(hnd.m_padding, sizeof(hnd.m_padding)); + buf.WriteQWord(hnd.m_rockstar_id, sizeof(hnd.m_rockstar_id) * 8); + buf.Write(hnd.m_padding, sizeof(hnd.m_padding) * 8); } }