diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h index eec35c8a3..0dfc4e413 100644 --- a/src/shared/ByteBuffer.h +++ b/src/shared/ByteBuffer.h @@ -385,21 +385,22 @@ class ByteBuffer void appendPackGUID(uint64 guid) { - if (_storage.size() < _wpos + sizeof(guid) + 1) - _storage.resize(_wpos + sizeof(guid) + 1); - - size_t mask_position = wpos(); - *this << uint8(0); - for(uint8 i = 0; i < 8; ++i) + uint8 packGUID[8+1]; + packGUID[0] = 0; + size_t size = 1; + for (uint8 i = 0; guid != 0; ++i) { - if(guid & 0xFF) + if (guid & 0xFF) { - _storage[mask_position] |= uint8(1 << i); - *this << uint8(guid & 0xFF); + packGUID[0] |= uint8(1 << i); + packGUID[size] = uint8(guid & 0xFF); + ++size; } guid >>= 8; } + + append(packGUID, size); } void put(size_t pos, const uint8 *src, size_t cnt) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index aae936f04..949a68f51 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9615" + #define REVISION_NR "9616" #endif // __REVISION_NR_H__