mirror of
https://github.com/revanced/smali.git
synced 2025-05-19 15:37:06 +02:00
Throw an error if a switch data pseudo-instruction is encountered when auto-fixing a method.
git-svn-id: https://smali.googlecode.com/svn/trunk@518 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
a8ca776c1d
commit
146fbfd33a
@ -549,8 +549,7 @@ public class CodeItem extends Item<CodeItem> {
|
|||||||
|
|
||||||
int originalSwitchOffset = originalSwitchOffsetByOriginalSwitchDataOffset.get(originalDataOffset);
|
int originalSwitchOffset = originalSwitchOffsetByOriginalSwitchDataOffset.get(originalDataOffset);
|
||||||
if (originalSwitchOffset == 0) {
|
if (originalSwitchOffset == 0) {
|
||||||
//TODO: is it safe to skip an unreferenced switch data instruction? Or should it throw an exception?
|
throw new RuntimeException("This method contains an unreferenced switch data block, and can't be automatically fixed.");
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert newOffsetsByOriginalOffset.indexOfKey(originalSwitchOffset) >= 0;
|
assert newOffsetsByOriginalOffset.indexOfKey(originalSwitchOffset) >= 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user