Fix the class data offset in DexBackedClassDef

This commit is contained in:
Ben Gruver
2012-10-21 21:41:54 -07:00
parent 3f2861b477
commit 0f7b4c40f4

View File

@ -76,7 +76,7 @@ public class DexBackedClassDef implements ClassDef {
int annotationsDirectoryOffset = dexBuf.readSmallUint(classDefOffset + ANNOTATIONS_OFFSET);
this.annotationsDirectory = AnnotationsDirectory.newOrEmpty(dexBuf, annotationsDirectoryOffset);
this.classDataOffset = dexBuf.readSmallUint(CLASS_DATA_OFFSET);
this.classDataOffset = dexBuf.readSmallUint(classDefOffset + CLASS_DATA_OFFSET);
this.staticInitialValuesOffset = dexBuf.readSmallUint(classDefOffset + STATIC_INITIAL_VALUES_OFFSET);
}