use the offset for the CodeItem, not the index

git-svn-id: https://smali.googlecode.com/svn/trunk@393 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-11 05:26:59 +00:00
parent 5c0670b2da
commit a7ea38929b

View File

@ -427,11 +427,11 @@ public class ClassDataItem extends Item<ClassDataItem> {
out.annotate("access_flags");
out.writeUnsignedLeb128(accessFlags);
out.annotate("code_off");
out.writeUnsignedLeb128(codeItem==null?0:codeItem.getIndex());
out.writeUnsignedLeb128(codeItem==null?0:codeItem.getOffset());
}else {
out.writeUnsignedLeb128(method.getIndex() - previousIndex);
out.writeUnsignedLeb128(accessFlags);
out.writeUnsignedLeb128(codeItem==null?0:codeItem.getIndex());
out.writeUnsignedLeb128(codeItem==null?0:codeItem.getOffset());
}
}