From 79d547e9d0a512e6cd0dfa4e8e2250d551654597 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 22 Apr 2013 18:41:12 -0700 Subject: [PATCH] fix return of bytes read to push pointer forwards --- libraries/avatars/src/AvatarData.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index d36894a793..d644937464 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -96,11 +96,12 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { // called on the other agents - assigns it to my views of the others int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) { - unsigned char* startPosition = sourceBuffer; - + // increment to push past the packet header sourceBuffer++; + unsigned char* startPosition = sourceBuffer; + memcpy(&_bodyPosition, sourceBuffer, sizeof(float) * 3); sourceBuffer += sizeof(float) * 3;