mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Allow try end addresses that fall in the middle of an instruction
This commit is contained in:
@ -70,6 +70,24 @@ public class SparseIntArray {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the int mapped from the specified key, or if not present, the
|
||||
* closest key that is less than the specified key.
|
||||
*/
|
||||
public int getClosestSmaller(int key) {
|
||||
int i = binarySearch(mKeys, 0, mSize, key);
|
||||
|
||||
if (i < 0) {
|
||||
i = ~i;
|
||||
if (i > 0) {
|
||||
i--;
|
||||
}
|
||||
return mValues[i];
|
||||
} else {
|
||||
return mValues[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the mapping from the specified key, if there was any.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user