mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
Fix wrong memory allocation and snprintf parameter type
This commit is contained in:
parent
0e01644a4c
commit
4e038ad084
@ -1169,7 +1169,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
||||
|
||||
occgeo->CalcBoundingBox();
|
||||
PrintContents (occgeo);
|
||||
char * name = new char(50);
|
||||
char * name = new char[50];
|
||||
//string name;
|
||||
STEP_GetEntityName(occgeo->shape,&reader,name);
|
||||
occgeo->snames.Append(name);
|
||||
@ -1180,7 +1180,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
|
||||
TopoDS_Face face = TopoDS::Face(exp0.Current());
|
||||
STEP_GetEntityName(face,&reader,name);
|
||||
if (name == string(""))
|
||||
snprintf(name, 50, "bc_%i", occgeo->fnames.Size());
|
||||
snprintf(name, 50, "bc_%zu", occgeo->fnames.Size());
|
||||
occgeo->fnames.Append(name);
|
||||
for (exp1.Init(face, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user