Return 0 if we emulate x - x
This commit is contained in:
parent
fdd3c119f5
commit
d34184f811
|
@ -196,6 +196,8 @@ namespace de4dot.blocks.cflow {
|
||||||
public static Int32Value Sub(Int32Value a, Int32Value b) {
|
public static Int32Value Sub(Int32Value a, Int32Value b) {
|
||||||
if (a.allBitsValid() && b.allBitsValid())
|
if (a.allBitsValid() && b.allBitsValid())
|
||||||
return new Int32Value(a.value - b.value);
|
return new Int32Value(a.value - b.value);
|
||||||
|
if (ReferenceEquals(a, b))
|
||||||
|
return new Int32Value(0);
|
||||||
return createUnknown();
|
return createUnknown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,8 @@ namespace de4dot.blocks.cflow {
|
||||||
public static Int64Value Sub(Int64Value a, Int64Value b) {
|
public static Int64Value Sub(Int64Value a, Int64Value b) {
|
||||||
if (a.allBitsValid() && b.allBitsValid())
|
if (a.allBitsValid() && b.allBitsValid())
|
||||||
return new Int64Value(a.value - b.value);
|
return new Int64Value(a.value - b.value);
|
||||||
|
if (ReferenceEquals(a, b))
|
||||||
|
return new Int32Value(0);
|
||||||
return createUnknown();
|
return createUnknown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user