diff --git a/shared/src/VoxelTree.cpp b/shared/src/VoxelTree.cpp index f7fff61f31..03c1ca5a15 100644 --- a/shared/src/VoxelTree.cpp +++ b/shared/src/VoxelTree.cpp @@ -202,7 +202,7 @@ void VoxelTree::deleteVoxelCodeFromTree(unsigned char *codeBuffer) { parentNode->children[childNDX]=NULL; // set it to NULL printf("reaverageVoxelColors()\n"); - reaverageVoxelColors(parentNode); // Fix our colors!! + reaverageVoxelColors(rootNode); // Fix our colors!! Need to call it on rootNode } } } diff --git a/tools/objtohio.php b/tools/objtohio.php index 8189ce1a47..95d51d0bc7 100644 --- a/tools/objtohio.php +++ b/tools/objtohio.php @@ -638,7 +638,7 @@ function convertObjFile($inputFileName,$outputFileName) // Note: fill from case 'fill_from': // a vertice - $ = new Vertice(); + $v = new Vertice(); $v->x = (float)$parts[1]; $v->y = (float)$parts[2]; $v->z = (float)$parts[3]; diff --git a/tools/sendvoxels.php b/tools/sendvoxels.php index 10b82fdde1..69f0f798fc 100644 --- a/tools/sendvoxels.php +++ b/tools/sendvoxels.php @@ -11,8 +11,12 @@ function send_voxels($inputFileName,$server,$port,$command) { $netData = pack("cv",ord($command),$voxNum); $packetSize = 3; // to start - while ($packetSize < 1450) { + while ($packetSize < 1450 && !feof($inputFile)) { $octets = fread($inputFile,1); + if (feof($inputFile)) { + echo "end of file\n"; + break; + } $octets = (int)ord($octets); echo "read octets=$octets\n";