Skip to content

Commit 6d664b6

Browse files
committed
Fix HResult
1 parent 434fff6 commit 6d664b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private static void OAFailed(int hr)
121121
throw new DivideByZeroException();
122122
case HResults.COR_E_OVERFLOW:
123123
throw new OverflowException();
124-
case HResults.TYPE_E_TYPEMISMATCH:
124+
case unchecked((int)0x80020005): // DISP_E_TYPEMISMATCH
125125
throw new InvalidCastException(SR.InvalidCast_OATypeMismatch);
126126
case HResults.E_INVALIDARG:
127127
throw new ArgumentException();

0 commit comments

Comments
 (0)