Fixed size calculation in placeItem

git-svn-id: https://smali.googlecode.com/svn/trunk@379 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-10 06:58:04 +00:00
parent 626c1fed54
commit 14f02f4884

View File

@ -75,7 +75,8 @@ public class StringDataItem extends Item<StringDataItem> {
/** {@inheritDoc} */
protected int placeItem(int offset) {
return offset + 4 + Utf8Utils.stringToUtf8Bytes(stringValue).length + 1;
return offset + Leb128Utils.unsignedLeb128Size(stringValue.length()) +
Utf8Utils.stringToUtf8Bytes(stringValue).length + 1;
}
/** {@inheritDoc} */