- fix: console program that needs input may crash

This commit is contained in:
royqh1979 2021-11-18 22:25:07 +08:00
parent 1c9bb49799
commit bc2d662c1d
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Version 0.9.2 For Dev-C++ 7 Beta
- fix: console program that needs input may crash
Version 0.9.1 For Dev-C++ 7 Beta Version 0.9.1 For Dev-C++ 7 Beta
- enhancement: code completion suggestion for "__func__" variable - enhancement: code completion suggestion for "__func__" variable
- fix: ide failed to start, if there are errors in the compiler set settings - fix: ide failed to start, if there are errors in the compiler set settings

View File

@ -184,6 +184,8 @@ int main(int argc, char** argv) {
SetStdHandle(STD_ERROR_HANDLE, hOutput); SetStdHandle(STD_ERROR_HANDLE, hOutput);
freopen("CONOUT$","w+",stdout); freopen("CONOUT$","w+",stdout);
freopen("CONOUT$","w+",stderr); freopen("CONOUT$","w+",stderr);
} else {
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
} }
// Save starting timestamp // Save starting timestamp