Problem: Windows 10: crash when cursor is at bottom of terminal.
Solution: Position the cursor before resizing. (Yasuhiro Matsumoto,
closes #4679)
CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
SMALL_RECT srWindowRect; /* hold the new console size */
COORD coordScreen;
+ COORD cursor;
static int resized = FALSE;
#ifdef MCH_WRITE_DUMP
}
else
{
+ // Workaround for a Windows 10 bug
+ cursor.X = srWindowRect.Left;
+ cursor.Y = srWindowRect.Top;
+ SetConsoleCursorPosition(hConsole, cursor);
+
ResizeConBuf(hConsole, coordScreen);
ResizeWindow(hConsole, srWindowRect);
resized = TRUE;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1695,
/**/
1694,
/**/