Fixed -O double fclose (bug #1221)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7083 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2bdfe648f0
commit
788620866d
2 changed files with 6 additions and 2 deletions
|
@ -70,8 +70,10 @@ static void myatexit()
|
|||
{
|
||||
dopause();
|
||||
ResetPrintColor();
|
||||
if (g_output != stdout && g_output) fclose(g_output), g_output = 0;
|
||||
if (g_errout != stderr && g_errout) fclose(g_errout), g_errout = 0;
|
||||
bool oneoutputstream = g_output == g_errout;
|
||||
if (g_output != stdout && g_output ) fclose(g_output);
|
||||
if (g_errout != stderr && g_errout && !oneoutputstream) fclose(g_errout);
|
||||
g_output = g_errout = 0;
|
||||
#ifdef _WIN32
|
||||
SetConsoleOutputCP(g_wincon_orgoutcp);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue