diff options
author | xtkoba <69125751+xtkoba@users.noreply.github.com> | 2021-05-09 09:18:52 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-03-15 08:33:40 +0900 |
commit | 63b1633f869d6866ed70dbf80efc954d26127a04 (patch) | |
tree | a976723bbfa316432e523cf35b33336909ef64da /ext | |
parent | aa347cbe65031ff02a5b2de0f7a36e29d72b8008 (diff) |
[ruby/win32ole] Get rid of potential undefined behavior
See https://bugs.llvm.org/show_bug.cgi?id=50236
https://github.com/ruby/win32ole/commit/019ec2b3cb
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32ole/win32ole.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 5ad6a80eb9..d77347b3a3 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -2522,12 +2522,12 @@ fole_initialize(int argc, VALUE *argv, VALUE self) OLE_RELEASE(pIClassFactory2); } } - pDispatch = p; if(FAILED(hr)) { ole_raise(hr, eWIN32OLERuntimeError, "failed to create WIN32OLE object from `%s'", StringValuePtr(svr_name)); } + pDispatch = p; ole_set_member(self, pDispatch); return self; |