Merge pull request #1186 from ZappoMan/bugfixes

fixed warning and logic problem
This commit is contained in:
Stephen Birarda 2013-11-05 13:12:46 -08:00
commit ead307216f
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ void VoxelServerPacketProcessor::processPacket(sockaddr& senderAddress, unsigned
unsigned char* voxelData = (unsigned char*)&packetData[atByte];
while (atByte < packetLength) {
int maxSize = packetLength - atByte;
unsigned char octets = numberOfThreeBitSectionsInCode(voxelData, maxSize);
int octets = numberOfThreeBitSectionsInCode(voxelData, maxSize);
if (octets == OVERFLOWED_OCTCODE_BUFFER) {
printf("WARNING! Got voxel edit record that would overflow buffer in numberOfThreeBitSectionsInCode(), ");

View file

@ -582,7 +582,7 @@ void VoxelTree::processRemoveVoxelBitstream(unsigned char * bitstream, int buffe
unsigned char* voxelCode = (unsigned char*)&bitstream[atByte];
while (atByte < bufferSizeBytes) {
int maxSize = bufferSizeBytes - atByte;
unsigned char codeLength = numberOfThreeBitSectionsInCode(voxelCode, maxSize);
int codeLength = numberOfThreeBitSectionsInCode(voxelCode, maxSize);
if (codeLength == OVERFLOWED_OCTCODE_BUFFER) {
printf("WARNING! Got remove voxel bitstream that would overflow buffer in numberOfThreeBitSectionsInCode(), ");