thegenemyers / DAZZ_DB

The Dazzler Data Base
Other
35 stars 33 forks source link

Closing wrong file in Catrack when existing data file #6

Closed cancan101 closed 9 years ago

cancan101 commented 9 years ago

On this line you are calling fclose on aout when it should be dout:

    dout = fopen(Catenate(prefix,argv[2],".","data"),"r");
    if (dout != NULL)
      { fprintf(stderr,"%s: Track file %s%s.data already exists!\n",Prog_Name,prefix,argv[2]);
        fclose(aout);
        exit (1);
      }
thegenemyers commented 9 years ago

Yes, thanks. Will be in next minor update. -- Gene

On 2/11/15, 7:06 AM, Alex Rothberg wrote:

On this line https://github.com/thegenemyers/DAZZ_DB/blob/40136f82cbf13fccc264d0f7b34c87e2189e1609/Catrack.c#L114 you are calling |fclose| on |aout| when it should be |dout|:

 dout = fopen(Catenate(prefix,argv[2],".","data"),"r");
 if  (dout !=NULL)
   {fprintf(stderr,"%s: Track file%s%s.data already exists!\n",Prog_Name,prefix,argv[2]);
     fclose(aout);
     exit  (1);
   }

— Reply to this email directly or view it on GitHub https://github.com/thegenemyers/DAZZ_DB/issues/6.

thegenemyers commented 9 years ago

Corrected in recent update.