Merge pull request #1788 from birarda/assert-crash

fix incorrect packet position in AvatarData
This commit is contained in:
AndrewMeadows 2014-01-31 11:24:43 -08:00
commit 19e8ddd202

View file

@ -173,8 +173,8 @@ int AvatarData::parseData(const QByteArray& packet) {
} }
// increment to push past the packet header // increment to push past the packet header
const unsigned char* sourceBuffer = reinterpret_cast<const unsigned char*>(packet.data()); const unsigned char* startPosition = reinterpret_cast<const unsigned char*>(packet.data());
const unsigned char* startPosition = sourceBuffer + numBytesForPacketHeader(packet); const unsigned char* sourceBuffer = startPosition + numBytesForPacketHeader(packet);
// Body world position // Body world position
memcpy(&_position, sourceBuffer, sizeof(float) * 3); memcpy(&_position, sourceBuffer, sizeof(float) * 3);