Skip to content

Commit

Permalink
修改infile多次关闭bug
Browse files Browse the repository at this point in the history
  • Loading branch information
张贺 committed Aug 29, 2023
1 parent 8572424 commit b871d5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/muse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ MUSE::~MUSE()

if (me == 0) {
if (screen && screen != stdout) fclose(screen);
if (infile != stdin) fclose(infile);
//infile 已在file()内关闭但是为了避免自定义main()中不调用file(),增加此行判断
if (infile && infile != stdin) fclose(infile);
if (logfile) fclose(logfile);
}

Expand Down

0 comments on commit b871d5f

Please sign in to comment.