Glenn Maynard's patch completely disabled PuTTY{,tel} on any system
[u/mdw/putty] / window.c
index 3fd445f..42e4d6d 100644 (file)
--- a/window.c
+++ b/window.c
@@ -170,12 +170,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
 
     {
        ZeroMemory(&osVersion, sizeof(osVersion));
-       osVersion.dwOSVersionInfoSize = sizeof(osVersion);
+       osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
 
        if(!GetVersionEx ((OSVERSIONINFO *) &osVersion)) {
        // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO.
 
-       osVersion.dwOSVersionInfoSize = sizeof (osVersion);
+       osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
        if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion))
            return FALSE;
        }