diff --git a/src/main/java/com/reandroid/dex/ins/SizeXIns.java b/src/main/java/com/reandroid/dex/ins/SizeXIns.java index 92ae6733a..608ae204f 100644 --- a/src/main/java/com/reandroid/dex/ins/SizeXIns.java +++ b/src/main/java/com/reandroid/dex/ins/SizeXIns.java @@ -317,10 +317,13 @@ public boolean equals(Object obj) { return false; } } - if(getSectionType() != null){ + if (getSectionType() != null) { return Objects.equals(getKey(), sizeXIns.getKey()); - }else { - return getData() == sizeXIns.getData(); + } else { + if (this instanceof ConstNumberLong) { + return getLong() == sizeXIns.getLong(); + } + return getData() == sizeXIns.getLong(); } } @@ -339,10 +342,14 @@ public int hashCode() { } hash = hash * 31; Key key = getKey(); - if(key != null){ + if (key != null) { hash = hash + key.hashCode(); - }else { - hash = hash + getData(); + } else { + if (this instanceof ConstNumberLong) { + hash = hash * 31 + Long.hashCode(getLong()); + } else { + hash = hash * 31 + getData(); + } } return hash; }