Browse Source

Prevent double fclose

ceriel 22 years ago
parent
commit
42f568c0e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      util/LLgen/src/main.c

+ 1 - 1
util/LLgen/src/main.c

@@ -184,7 +184,6 @@ main(argc,argv) register string	argv[]; {
 	setinit(ntneeded);
 	maxnt = &nonterms[nnonterms];
 	maxt = &tokens[ntokens];
-	fclose(fact);
 	/*
 	 * Now, the grammar is read. Do some computations
 	 */
@@ -198,6 +197,7 @@ main(argc,argv) register string	argv[]; {
 		      stderr);
 	}
 	else	gencode(argc);
+	fclose(fact);
 	UNLINK(f_temp);
 	UNLINK(f_pars);
 	if (verbose) {