small fix

For MeshLab, but may be also needed in other cases. We need to store a COPY of the property name, in case the char* that was passed to the function is not persistent. May result ina small leak :(
This commit is contained in:
Marco Callieri 2018-02-16 18:03:53 +01:00
parent d9720914a3
commit ec9434d2a1
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public:
elemDescVec[elemType]->push_back(PropDescriptor()); elemDescVec[elemType]->push_back(PropDescriptor());
elemNameVec[elemType]->push_back(attrName); elemNameVec[elemType]->push_back(attrName);
elemDescVec[elemType]->back().elemname=elemStr[elemType]; elemDescVec[elemType]->back().elemname=elemStr[elemType];
elemDescVec[elemType]->back().propname=propName; elemDescVec[elemType]->back().propname=strdup(propName);
elemDescVec[elemType]->back().stotype1 = vcg::ply::T_FLOAT; elemDescVec[elemType]->back().stotype1 = vcg::ply::T_FLOAT;
elemDescVec[elemType]->back().memtype1 = vcg::ply::T_FLOAT; elemDescVec[elemType]->back().memtype1 = vcg::ply::T_FLOAT;
} }