Core/Objects: fixed buffer initialization of PackedGuid (#462)
* Core/ObjectGuid: Properly initialize PackedGuid buffer * use correct initializer for buffer initialization * correct array initialization in PackedGuid constructors --------- Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
This commit is contained in:
1 parent
e7a52305cd
commit
2e6bee2104
2 files changed
+3
-2
No files matched your search
@@ -86,6 +86,7 @@ ObjectGuid ObjectGuid::MapSpecific(HighGuid type, uint32 entry, LowType counter)
|
||||
void PackedGuid::Set(ObjectGuid guid)
|
||||
{
|
||||
_packedSize = 1;
|
||||
_packedGuid = { };
|
||||
uint64 raw = guid.GetRawValue();
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
{
|
||||
|
||||
@@ -299,8 +299,8 @@ class TC_GAME_API PackedGuid
|
||||
friend TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, PackedGuid const& guid);
|
||||
|
||||
public:
|
||||
explicit PackedGuid() : _packedSize(1), _packedGuid() { }
|
||||
explicit PackedGuid(ObjectGuid guid) { Set(guid); }
|
||||
explicit PackedGuid() : _packedSize(1), _packedGuid({}) { }
|
||||
explicit PackedGuid(ObjectGuid guid) : _packedSize(1), _packedGuid({}) { Set(guid); }
|
||||
|
||||
void Set(ObjectGuid guid);
|
||||
|
||||
|
||||
Reference in new issue
Block a user