Commit 2c9c5706 authored by Ben Boeckel's avatar Ben Boeckel

vtkWebGLDataSet: use braces

The code always modified `pos` even when it should not have.
parent 3aba992f
Pipeline #18434 passed with stage
......@@ -170,7 +170,11 @@ void vtkWebGLDataSet::GenerateBinaryData()
memcpy(&this->binary[pos], &this->NumberOfIndexes, sizeof(this->NumberOfIndexes)); pos+=sizeof(this->NumberOfIndexes); //IndCount
memcpy(&this->binary[pos], this->indexes, this->NumberOfIndexes*sizeof(this->indexes[0])); pos+=this->NumberOfIndexes*sizeof(this->indexes[0]);
memcpy(&this->binary[pos], this->Matrix, sizeof(this->Matrix[0])*16); pos+=sizeof(this->Matrix[0])*16; //Matrix
if (this->tcoords) memcpy(&this->binary[pos], this->tcoords, size*2); pos+=size*2; //TCoord
if (this->tcoords) //TCoord
{
memcpy(&this->binary[pos], this->tcoords, size*2);
pos+=size*2;
}
memcpy(&this->binary[0], &pos, sizeof(pos));
this->binarySize = total;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment