fix an issue that occurs when a switch statement is the first instruction in a method

git-svn-id: https://smali.googlecode.com/svn/trunk@520 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-12-24 08:08:14 +00:00
parent b145895c49
commit 5f758b60b4

View File

@ -547,8 +547,8 @@ public class CodeItem extends Item<CodeItem> {
assert originalOffsetsByNewOffset.indexOfKey(currentCodeOffset) >= 0;
int originalDataOffset = originalOffsetsByNewOffset.get(currentCodeOffset);
int originalSwitchOffset = originalSwitchOffsetByOriginalSwitchDataOffset.get(originalDataOffset);
if (originalSwitchOffset == 0) {
int originalSwitchOffset = originalSwitchOffsetByOriginalSwitchDataOffset.get(originalDataOffset, -1);
if (originalSwitchOffset == -1) {
throw new RuntimeException("This method contains an unreferenced switch data block, and can't be automatically fixed.");
}