Skip to content
Snippets Groups Projects
Commit 6909d912 authored by Éric Béchet's avatar Éric Béchet
Browse files

nasty bug ;)

parent 0aba2e97
No related branches found
No related tags found
No related merge requests found
......@@ -194,10 +194,11 @@ int GModel::readMSH(const std::string &name)
MVertex *vertex = 0;
if(!binary){
if(fscanf(fp, "%d %lf %lf %lf %d", &num, &xyz[0], &xyz[1], &xyz[2],
&entity) != 5)
&entity) != 5) {
fclose(fp);
return 0;
}
}
else{
if(fread(&num, sizeof(int), 1, fp) != 1){ fclose(fp); return 0; }
if(swap) SwapBytes((char*)&num, sizeof(int), 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment