Merge pull request #1755 from birarda/master

fix for HandData crash
This commit is contained in:
AndrewMeadows 2014-01-30 09:56:17 -08:00
commit d556119087
2 changed files with 7 additions and 2 deletions

View file

@ -3225,7 +3225,8 @@ void Application::displayStats() {
glPointSize(1.0f);
int totalAvatars = _avatarManager.size();
// we need to take one avatar out so we don't include ourselves
int totalAvatars = _avatarManager.size() - 1;
int totalServers = NodeList::getInstance()->size();
if (mirrorEnabled) {

View file

@ -234,7 +234,11 @@ void AvatarManager::processAvatarMixerDatagram(const QByteArray& datagram, const
// copy the rest of the packet to the avatarData holder so we can read the next Avatar from there
dummyAvatarByteArray.resize(numDummyByteArrayHeaderBytes);
dummyAvatarByteArray += datagram.mid(bytesRead);
// make this Avatar's UUID the UUID in the packet and tack the remaining data onto the end
dummyAvatarByteArray.replace(numDummyByteArrayHeaderBytes - NUM_BYTES_RFC4122_UUID,
NUM_BYTES_RFC4122_UUID + datagram.size() - bytesRead,
datagram.mid(bytesRead));
// have the matching (or new) avatar parse the data from the packet
bytesRead += matchingAvatar->parseData(dummyAvatarByteArray);