]> git.llucax.com Git - z.facultad/75.06/jacu.git/blobdiff - src/statichuff/statichuff.c
Fclose fix
[z.facultad/75.06/jacu.git] / src / statichuff / statichuff.c
index 0632e361aac65a3782bea43d65b8c974c755ebdf..797ca1723446bf4eee23d9cf60d35649eb760caa 100644 (file)
@@ -237,7 +237,10 @@ int shuff_encode_symbols(HUFF_STATE *shuff, SHUFFCODE *ctable)
        SHUFFCODE symbolcode;
                
        /* Abrimos el source y el destino */
-       if (shuff->coderfp != NULL) fclose(shuff->coderfp); /* close bychunk temp file */
+       if (shuff->coderfp != NULL) {
+               fclose(shuff->coderfp); /* close bychunk temp file */
+               shuff->coderfp = NULL;
+       }
        if ((fpsource = fopen(shuff->sourcefile,"r")) == NULL) return 0;
        if ((fpdest = vfopen(shuff->targetfile,"w",shuff->volsize)) == NULL) return 0;