Menu

#9 bug in mcpp_main

v1.0 (example)
open
None
5
2014-12-10
2014-12-10
No

lines 436-442 in main function are better change to followings:

if (fp_in && fp_in != stdin)
    fclose( fp_in);
if (fp_out && fp_out != stdout)
    fclose( fp_out);
if (fp_err && fp_err != stderr)
    fclose( fp_err);

because if these files fail with 'fopen' they will set to NULL and closing them will make a fatal error.

Discussion


Log in to post a comment.