Ensure m_offset gets initialized

This commit is contained in:
Joshua Ashton 2020-07-28 05:59:53 +01:00
parent 3a46a59a96
commit 118bceb592
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace Feather::Network
{
public:
PacketReader(const uint8_t *const dataPtr)
: m_data(dataPtr), m_length(ReadVarInt())
: m_data(dataPtr), m_offset(0), m_length(ReadVarInt())
{
}
@ -67,8 +67,8 @@ namespace Feather::Network
uint32_t Length() const { return m_length; }
private:
const uint8_t *const m_data;
uint32_t m_offset;
const uint32_t m_length;
uint32_t m_offset = 0;
};
}