mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-22 01:52:01 +08:00
GT-0 fixing junit tests
This commit is contained in:
+3
-2
@@ -37,8 +37,9 @@ public class AddressBasedIndexMapper implements IndexMapper {
|
||||
public BigInteger map(BigInteger value) {
|
||||
Address address = from.getAddress(value);
|
||||
if (address == null) {
|
||||
return null;
|
||||
return BigInteger.ZERO;
|
||||
}
|
||||
return to.getIndex(address);
|
||||
BigInteger mapped = to.getIndex(address);
|
||||
return mapped != null ? mapped : BigInteger.ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -33,5 +33,11 @@ public interface IndexMapper {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Maps an index from one address mapping to another. This method will return
|
||||
* {@link BigInteger#ZERO} if there no mapping.
|
||||
* @param value the index value to map from an old index map to a new index map
|
||||
* @return the mapped index
|
||||
*/
|
||||
public BigInteger map(BigInteger value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user