From 94b21490da6971c1908d8fb52658d82a8dc32661 Mon Sep 17 00:00:00 2001 From: de4dot Date: Mon, 30 Jul 2012 19:06:31 +0200 Subject: [PATCH] Add code to truncate r4/r8 values --- blocks/cflow/InstructionEmulator.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blocks/cflow/InstructionEmulator.cs b/blocks/cflow/InstructionEmulator.cs index 18ce2bae..7eb0e648 100644 --- a/blocks/cflow/InstructionEmulator.cs +++ b/blocks/cflow/InstructionEmulator.cs @@ -143,6 +143,16 @@ namespace de4dot.blocks.cflow { if (value.isInt64()) return value; return Int64Value.createUnknown(); + + case ElementType.R4: + if (value.isReal8()) + return new Real8Value((float)((Real8Value)value).value); + return new UnknownValue(); + + case ElementType.R8: + if (value.isReal8()) + return value; + return new UnknownValue(); } return value; }