Ensure m_offset gets initialized
This commit is contained in:
parent
3a46a59a96
commit
118bceb592
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue