1. Jason R. Coombs
  2. PuTTY

Commits

si...@cda61777-01e9-0310-a592-d414129be87e  committed b3d7676

Remove the OSVERSIONINFOEX code because there's no obvious way to
determine whether it'll compile before receiving the compile error.
Gah.

  • Participants
  • Parent commits 1624923
  • Branches default

Comments (0)

Files changed (1)

File window.c

View file
 
 static int compose_state = 0;
 
-static OSVERSIONINFOEX osVersion;
+static OSVERSIONINFO osVersion;
 
 /* Dummy routine, only required in plink. */
 void ldisc_update(int echo, int edit)
 
     {
 	ZeroMemory(&osVersion, sizeof(osVersion));
-	osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
-	if(!GetVersionEx ((OSVERSIONINFO *) &osVersion)) {
-	// If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
-
 	osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
-	if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion))
-	    return FALSE;
-	}
+	if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion)) {
+            MessageBox(NULL, "Windows refuses to report a version",
+                       "PuTTY Fatal Error", MB_OK | MB_ICONEXCLAMATION);
+	    return 1;
+        }
     }
 
     /*