From cfc5928e378181f0315551dbe65f5ff448ae7f3c Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Sat, 15 Jun 2002 23:40:48 +0000
Subject: [PATCH] Initialize "length" field of structure prior to call.  Thanks
 to Lawrence Wood for the bug fix.

---
 v7/src/microcode/ntscreen.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/v7/src/microcode/ntscreen.c b/v7/src/microcode/ntscreen.c
index 0b8bab96c..52138c761 100644
--- a/v7/src/microcode/ntscreen.c
+++ b/v7/src/microcode/ntscreen.c
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: ntscreen.c,v 1.46 2000/12/05 21:23:45 cph Exp $
+$Id: ntscreen.c,v 1.47 2002/06/15 23:40:48 cph Exp $
 
-Copyright (c) 1993-2000 Massachusetts Institute of Technology
+Copyright (c) 1993-2002 Massachusetts Institute of Technology
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -16,7 +16,8 @@ General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
 */
 
 /* #include <stdio.h> */
@@ -1341,15 +1342,15 @@ SizeScreen (HWND hWnd, WORD wVertSize, WORD wHorzSize )
       return  FALSE;
 
    if (IsIconic(hWnd)) {
-     /*   THis entire section is a crock to ensure a reasonably sized window
-          when Scheme is started minimized
+     /* This entire section is a crock to ensure a reasonably sized window
+        when Scheme is started minimized.
 
         Since we protect this procedure against minimizing in the WndProc, we
         can get here only when window is launched in a minimized state.  We
         get here because of the SendMessage in ScreenReset.  Our duty is to
 	fake a normal position and size.
-        Luckily none of the scrolling businness happens because all the cursor
-        etc are at zero. (Hopefully it would be clipped).
+        Luckily none of the scrolling business happens because all the cursor
+        etc are at zero.  (Hopefully it would be clipped).
      */
      WINDOWPLACEMENT pl;
      int width, height, params[4] = {-1, -1, 0, 0};  /* left,top,width,height*/
@@ -1358,6 +1359,7 @@ SizeScreen (HWND hWnd, WORD wVertSize, WORD wHorzSize )
 		    GetSystemMetrics(SM_CXSCREEN));
      height  = min (params[3] ? params[3] : 40*screen->yChar,
 		    GetSystemMetrics(SM_CYSCREEN));
+     pl.length = (sizeof (pl));
      GetWindowPlacement (hWnd, &pl);
      AdjustedSize (screen, &width, &height);
      pl.rcNormalPosition.left = params[0]==-1 ? 0 : params[0];
-- 
2.25.1