From ccd4f5e0029768c804aad5f538472c931108b475 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 22 May 2013 14:25:25 -0700 Subject: [PATCH] CR feedback --- voxel-server/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index f4c05e1c31..3a08b1aaf7 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -572,7 +572,8 @@ int main(int argc, const char * argv[]) { unsigned char* voxelData = (unsigned char*)&packetData[atByte]; while (atByte < receivedBytes) { unsigned char octets = (unsigned char)*voxelData; - int voxelDataSize = bytesRequiredForCodeLength(octets)+3; // 3 for color! + const int COLOR_SIZE_IN_BYTES = 3; + int voxelDataSize = bytesRequiredForCodeLength(octets) + COLOR_SIZE_IN_BYTES; int voxelCodeSize = bytesRequiredForCodeLength(octets); // color randomization on insert