diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-12-22 10:41:50 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-12-22 10:41:50 +0100 |
| commit | b21a20ca16bd342dfc609a5b25fb0fe63f992715 (patch) | |
| tree | 92bebcea1fa798902d1528230a7bc20b84d9c10b /src | |
| parent | 73bea0870454ab6d495378cefb31c000f0441966 (diff) | |
replace castclass by IsInst when sure it's not null
Diffstat (limited to 'src')
| -rw-r--r-- | src/Instantiator.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Instantiator.cs b/src/Instantiator.cs index 90cb8045..d4178dbf 100644 --- a/src/Instantiator.cs +++ b/src/Instantiator.cs @@ -1124,7 +1124,7 @@ namespace Crow if (dstType.IsValueType) il.Emit (OpCodes.Unbox_Any, dstType); else - il.Emit (OpCodes.Castclass, dstType); + il.Emit (OpCodes.Isinst, dstType); il.Emit (OpCodes.Br, endConvert); il.MarkLabel (convert); |