1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
xtkoba 2021-05-09 09:18:52 +09:00 committed by git
parent aa347cbe65
commit 63b1633f86

View file

@ -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;