Module: wine
Branch: master
Commit: d62534d1990c65c3c8a26c0f0daac2999492773f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d62534d1990c65c3c8a26c0f0…
Author: Piotr Caban <piotr(a)codeweavers.com>
Date: Mon Mar 15 23:39:46 2010 +0100
oleaut32: Remove incorrect memid validation.
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index 6908bbf..d862667 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -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,