[commit] r2703 - trunk/GME/Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Oct 30 15:57:59 CDT 2017


Author: ksmyth
Date: Mon Oct 30 15:57:58 2017
New Revision: 2703

Log:
Fix crash under x64 GME

Modified:
   trunk/GME/Mga/MgaConnection.h

Modified: trunk/GME/Mga/MgaConnection.h
==============================================================================
--- trunk/GME/Mga/MgaConnection.h	Fri Oct 13 11:56:53 2017	(r2702)
+++ trunk/GME/Mga/MgaConnection.h	Mon Oct 30 15:57:58 2017	(r2703)
@@ -21,8 +21,11 @@
 public:
 	static HRESULT WINAPI simpletest(void* pv, REFIID riid, LPVOID* ppv, DWORD_PTR dw) {
 				FCO *f = reinterpret_cast<CMgaConnection*>(pv)->innFCO;
-				if(!f->simpleconn()) return E_NOINTERFACE; // this breaks COM rules
-				IUnknown* pUnk = (IUnknown*)((int)pv+dw);
+				if(!f->simpleconn()) {
+					*ppv = NULL;
+					return E_NOINTERFACE; // this breaks COM rules
+				}
+				IUnknown* pUnk = (IUnknown*)((char*)pv+dw);
 				pUnk->AddRef();
 				*ppv = pUnk;
 				return S_OK;


More information about the gme-commit mailing list