fixed warning and logic problem

This commit is contained in:
ZappoMan 2013-11-05 13:11:35 -08:00
parent 6dc7f68f0e
commit 7cbebf3941
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(), ");