WineMine cannot save score on Windows

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

 



Hello!

It's a resend.  Hopefully I'll try to explain this patch better this time.
WineMine calls RegCreateKeyEx with uninitialized SECURITY_ATTRIBUTES
argument.  Wine accepts is, but Windows 2000 doesn't.  As a result,
Winemine fails to save score on Windows 2000.

Also, WineMine passes the "disp" (disposition) argument but doesn't use
it.  Those arguments have been replaced with NULL.

ChangeLog:
	* programs/winemine/main.c:
	Don't pass unused pointers to RegCreateKeyEx() - this
	prevents score saving on Windows 2000.

-- 
Regards,
Pavel Roskin
--- programs/winemine/main.c
+++ programs/winemine/main.c
@@ -384,17 +384,15 @@ void LoadBoard( BOARD *p_board )
 
 void SaveBoard( BOARD *p_board )
 {
-    DWORD disp;
     HKEY hkey;
-    SECURITY_ATTRIBUTES sa;
     unsigned i;
     char data[16];
     char key_name[8];
 
     if( RegCreateKeyEx( HKEY_LOCAL_MACHINE,
                 "Software\\Wine\\WineMine", 0, NULL,
-                REG_OPTION_NON_VOLATILE, KEY_WRITE, &sa,
-                &hkey, &disp ) != ERROR_SUCCESS)
+                REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL,
+                &hkey, NULL ) != ERROR_SUCCESS)
         return;
 
     wsprintf( data, "%d", p_board->pos.x );

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

  Powered by Linux