Skip to content

Commit

Permalink
* ext/win32ole/win32ole.c (ole_variant2val): fix the bug when
Browse files Browse the repository at this point in the history
  SAFEARRAY pointer is NULL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
suketa committed Feb 9, 2007
1 parent ffe1735 commit c835982
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sat Feb 10 07:41:52 2007 Masaki Suketa <masaki.suketa@nifty.ne.jp>

* ext/win32ole/win32ole.c (ole_variant2val): fix the bug when
SAFEARRAY pointer is NULL.

Sat Feb 10 00:13:11 2007 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>

* ext/tk/lib/tk.rb: fix typo (TkConfigMethod::__confinfo_cmd,
Expand Down
6 changes: 5 additions & 1 deletion ext/win32ole/win32ole.c
Expand Up @@ -79,7 +79,7 @@

#define WC2VSTR(x) ole_wc2vstr((x), TRUE)

#define WIN32OLE_VERSION "0.7.0"
#define WIN32OLE_VERSION "0.7.1"

typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
Expand Down Expand Up @@ -922,6 +922,10 @@ ole_variant2val(pvar)
VALUE val;
VALUE val2;

if (!psa) {
return obj;
}

int dim = SafeArrayGetDim(psa);
VariantInit(&variant);
V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;
Expand Down

0 comments on commit c835982

Please sign in to comment.