From 4c56e227e8a6bf6acb612b95a66f39b2abb7faca Mon Sep 17 00:00:00 2001 From: Alan Kennedy Date: Sat, 26 Jun 2004 23:20:31 +0000 Subject: [PATCH] Fclose fix --- src/statichuff/statichuff.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.43.0