From f07f66455378337cd8797e4a5d69e35b0d7b8bf1 Mon Sep 17 00:00:00 2001 From: de4dot Date: Sun, 29 Jul 2012 09:49:00 +0200 Subject: [PATCH] Don't cast to a possible value type when result can be null --- de4dot.code/deobfuscators/ValueInlinerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/de4dot.code/deobfuscators/ValueInlinerBase.cs b/de4dot.code/deobfuscators/ValueInlinerBase.cs index 5c5a7dc5..358d63ae 100644 --- a/de4dot.code/deobfuscators/ValueInlinerBase.cs +++ b/de4dot.code/deobfuscators/ValueInlinerBase.cs @@ -58,7 +58,7 @@ namespace de4dot.code.deobfuscators { foreach (var tmp in callResults) { var callResult = (MyCallResult)tmp; var handler = decrypterMethods.find(callResult.methodReference); - callResult.returnValue = (TValue)handler((MethodDefinition)callResult.methodReference, callResult.gim, callResult.args); + callResult.returnValue = handler((MethodDefinition)callResult.methodReference, callResult.gim, callResult.args); } }