uninstaller messup fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

uninstaller was badly broken:

(AFAIR): the install strings list was being refreshed, which made the
currently active selection invalid (-1). Then the program tried to
use the current selection as array index (array[-1]).
BOOM !

ChangeLog: remember the currently active index before refreshing

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Determining best CVS host...
Using CVSROOT :pserver:cvs@rhlx01.fht-esslingen.de:/home/wine
Index: programs/uninstaller/main.c
===================================================================
RCS file: /home/wine/wine/programs/uninstaller/main.c,v
retrieving revision 1.4
diff -u -r1.4 main.c
--- programs/uninstaller/main.c	19 Nov 2001 02:30:13 -0000	1.4
+++ programs/uninstaller/main.c	21 Feb 2002 20:52:22 -0000
@@ -346,10 +346,12 @@
 
     case WM_PAINT:
       {
+	int prevsel = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
 	SendMessage(hwndList, LB_RESETCONTENT, 0, 0);
 	SendMessage(hwndList, WM_SETREDRAW, FALSE, 0);
 	for (i=0; i < numentries; i++)
 	    SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)entries[i].descr);
+	SendMessage(hwndList, LB_SETCURSEL, prevsel, 0 );
 	SendMessage(hwndList, WM_SETREDRAW, TRUE, 0);
         hdc = BeginPaint( hWnd, &ps );
         EndPaint( hWnd, &ps );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux