[try 2] imm32: Set size of OSVERSIONINFOA before calling GetVersionExA

Matt 'Murph' Finnicum mattfinn at gmail.com
Wed Jul 28 14:08:33 CDT 2010


Updated to not mix declarations and code, thx Andrew Nguyen.

This was causing console spam when I played Starcraft 2 (since
dwPlatformId was used uninitialized and thus was invalid).
-------------- next part --------------
---
 dlls/imm32/imm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index c708b83..28f482c 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1769,6 +1769,7 @@ UINT WINAPI ImmGetVirtualKey(HWND hWnd)
   if ( data )
       return data->lastVK;
 
+  version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
   GetVersionExA( &version );
   switch(version.dwPlatformId)
   {
-- 
1.7.1


More information about the wine-patches mailing list