diff --git a/blocks/cflow/MethodCallInlinerBase.cs b/blocks/cflow/MethodCallInlinerBase.cs index 970d87b1..47701e7d 100644 --- a/blocks/cflow/MethodCallInlinerBase.cs +++ b/blocks/cflow/MethodCallInlinerBase.cs @@ -229,7 +229,12 @@ namespace de4dot.blocks.cflow { } protected static bool isValueType(IType type) { - return type != null && type.IsValueType; + if (type == null) + return false; + var ts = type as TypeSig; + if (ts == null) + return type.IsValueType; + return ts.IsValueType && ts.ElementType != ElementType.Void; } } } diff --git a/de4dot.code/deobfuscators/Babel_NET/BabelMethodCallInliner.cs b/de4dot.code/deobfuscators/Babel_NET/BabelMethodCallInliner.cs index c6755377..bd629313 100644 --- a/de4dot.code/deobfuscators/Babel_NET/BabelMethodCallInliner.cs +++ b/de4dot.code/deobfuscators/Babel_NET/BabelMethodCallInliner.cs @@ -236,7 +236,7 @@ namespace de4dot.code.deobfuscators.Babel_NET { protected override bool isCompatibleType(int paramIndex, IType origType, IType newType) { if (new SigComparer().Equals(origType, newType)) return true; - if (newType.IsValueType || origType.IsValueType) + if (isValueType(newType) || isValueType(origType)) return false; return newType.FullName == "System.Object"; }