]> git.llucax.com Git - z.facultad/75.06/jacu.git/commitdiff
Fclose fix
authorAlan Kennedy <kennedya@3dgames.com.ar>
Sat, 26 Jun 2004 23:20:31 +0000 (23:20 +0000)
committerAlan Kennedy <kennedya@3dgames.com.ar>
Sat, 26 Jun 2004 23:20:31 +0000 (23:20 +0000)
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 */
        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;
                
        if ((fpsource = fopen(shuff->sourcefile,"r")) == NULL) return 0;
        if ((fpdest = vfopen(shuff->targetfile,"w",shuff->volsize)) == NULL) return 0;