Fixed a bug in the logic to read in an EncodedValue

git-svn-id: https://smali.googlecode.com/svn/trunk@43 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-05-18 01:21:00 +00:00
parent 74a8772861
commit 51b326d5a6
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class EncodedIndexedItemReference<T extends IndexedItem<T>>
public void readFrom(Input in) { public void readFrom(Input in) {
setReference(((IndexedSection<T>)getSection()).getByIndex( setReference(((IndexedSection<T>)getSection()).getByIndex(
(int)EncodedValueUtils.decodeUnsignedIntegralValue(in.readBytes(initialValueArg)))); (int)EncodedValueUtils.decodeUnsignedIntegralValue(in.readBytes(initialValueArg + 1))));
} }
public int place(int offset) { public int place(int offset) {

View File

@ -108,6 +108,7 @@ public class EncodedValue extends CompositeField<EncodedValue> {
public void readFrom(Input in) { public void readFrom(Input in) {
subField = EncodedValueSubFieldFactory.makeEncodedValueField(dexFile, getValueType()); subField = EncodedValueSubFieldFactory.makeEncodedValueField(dexFile, getValueType());
subField.setInitialValueArg(getValueArg());
subField.readFrom(in); subField.readFrom(in);
} }