From: Alan Kennedy Date: Sat, 26 Jun 2004 23:20:31 +0000 (+0000) Subject: Fclose fix X-Git-Tag: svn_import~50 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/4c56e227e8a6bf6acb612b95a66f39b2abb7faca Fclose fix --- diff --git a/src/statichuff/statichuff.c b/src/statichuff/statichuff.c index 0632e36..797ca17 100644 --- a/src/statichuff/statichuff.c +++ b/src/statichuff/statichuff.c @@ -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;