oleaut32: Remove incorrect memid validation.
authorPiotr Caban <piotr@codeweavers.com>
Mon, 15 Mar 2010 22:39:46 +0000 (23:39 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 16 Mar 2010 10:48:32 +0000 (11:48 +0100)
This code was trying to block negative values of memid (incorrectly).
I have run more tests and found that it's possible to set some negative
values (e.g. on TKIND_INTERFACE: -1, -4..-8, -500..?). Unless we know
what values are allowed it's probably better to not check memid.

dlls/oleaut32/typelib2.c

index 6908bbfe531bc2f7748eac755fd6fe9013df83b7..d862667bdda4f4b4275a07f54337bb74e83c5de3 100644 (file)
@@ -1689,7 +1689,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
 
     TRACE("(%p,%d,%p)\n", iface, index, pFuncDesc);
 
-    if(!pFuncDesc || (pFuncDesc->memid>0x7fffffff && pFuncDesc->memid!=MEMBERID_NIL))
+    if(!pFuncDesc)
         return E_INVALIDARG;
 
     TRACE("{%d,%p,%p,%d,%d,%d,%d,%d,%d,%d,{%d},%d}\n", pFuncDesc->memid,