Skip to content
Snippets Groups Projects
Commit 9fc54342 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

try to fix crash obsevred by Tom De Vuyst

parent af796fa7
No related branches found
No related tags found
No related merge requests found
......@@ -158,19 +158,20 @@ std::string GFace::getAdditionalInfoString()
{
if(l_edges.empty()) return std::string("");
char tmp[256];
std::string str("{");
std::list<GEdge*>::const_iterator it = l_edges.begin();
if(l_edges.size() > 10){
sprintf(tmp, "{%d, ..., %d}", (*l_edges.begin())->tag(), (*l_edges.end())->tag());
return std::string(tmp);
std::list<GEdge*>::const_iterator ite = l_edges.end();
char tmp[256];
sprintf(tmp, "%d, ..., %d", (*it)->tag(), (*ite)->tag());
}
std::string str("");
std::list<GEdge*>::const_iterator it = l_edges.begin();
str += "{";
for(; it != l_edges.end(); it++){
if(it != l_edges.begin()) str += ",";
sprintf(tmp, "%d", (*it)->tag());
str += tmp;
else{
for(; it != l_edges.end(); it++){
if(it != l_edges.begin()) str += ",";
char tmp[256];
sprintf(tmp, "%d", (*it)->tag());
str += tmp;
}
}
str += "}";
return str;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment