Skip to content

Commit

Permalink
Initialized some variables to 0 in inout_s.c
Browse files Browse the repository at this point in the history
  • Loading branch information
coprigent committed Feb 22, 2024
1 parent 0239e60 commit d3bc262
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mmgs/inout_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ int MMGS_loadMesh(MMG5_pMesh mesh, const char *filename) {
ncor = nri = ng = nedreq = nq = ntreq = 0;
bin = 0;
iswp = 0;
bpos = ia = 0;
mesh->np = mesh->nt = mesh->nti = mesh->npi = 0;

nref = 0;
Expand Down Expand Up @@ -171,7 +172,7 @@ int MMGS_loadMesh(MMG5_pMesh mesh, const char *filename) {
}
MMG_FREAD(&mesh->ver,MMG5_SW,1,inm);
if(iswp) mesh->ver = MMG5_swapbin(mesh->ver);
while(fread(&binch,MMG5_SW,1,inm)!=0 && binch!=54 ) {
while(fread(&binch,4,1,inm)!=0 && binch!=54 ) {
if(iswp) binch=MMG5_swapbin(binch);
if(binch==54) break;
if(!bdim && binch==3) { //Dimension
Expand Down

0 comments on commit d3bc262

Please sign in to comment.