- Remove duplicate annotation of the padding

- fix the calculation of the encoded handlers size, based on the presence or absence of the catch all handler

git-svn-id: https://smali.googlecode.com/svn/trunk@400 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-21 06:54:12 +00:00
parent b133198ba8
commit cf483d2e13

View File

@ -228,9 +228,6 @@ public class CodeItem extends Item<CodeItem> {
"fill_array_data instruction");
}
});
if (tries != null && (tries.length % 2 == 1)) {
out.annotate(2, "padding");
}
}
out.writeShort(registerCount);
@ -520,7 +517,7 @@ public class CodeItem extends Item<CodeItem> {
out.annotate("size: 0x" + Integer.toHexString(handlers.length) + " (" + handlers.length + ")");
int size = handlers.length;
if (catchAllHandlerAddress < 0) {
if (catchAllHandlerAddress > -1) {
size = size * -1;
}
out.writeSignedLeb128(size);
@ -539,7 +536,7 @@ public class CodeItem extends Item<CodeItem> {
}
} else {
int size = handlers.length;
if (catchAllHandlerAddress < 0) {
if (catchAllHandlerAddress > -1) {
size = size * -1;
}
out.writeSignedLeb128(size);