summaryrefslogtreecommitdiff
path: root/src/dex_file.cc
diff options
context:
space:
mode:
author mikaelpeltier <mikaelpeltier@google.com> 2012-11-07 14:02:15 +0100
committer mikaelpeltier <mikaelpeltier@google.com> 2012-11-07 14:02:15 +0100
commitebf6aa8185d59eeaa428b51a7e32ccc2b9ab1daf (patch)
tree95cf9de07529d58d847898087f8c5fd6c1e1a4fd /src/dex_file.cc
parenta0a641c5c47ef37a5d9467582c3dbc4cd3d29529 (diff)
Fix bug in static field initialization.
- Field::Set routines take the declaring class even for static field accesses. Change-Id: I842f47243b576b3d0793d5a47f329c8f9cab0d05
Diffstat (limited to 'src/dex_file.cc')
-rw-r--r--src/dex_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dex_file.cc b/src/dex_file.cc
index b7cefe300b..4ac80bc490 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -994,7 +994,7 @@ void EncodedStaticFieldValueIterator::ReadValueToField(Field* field) const {
}
case kType: {
Class* resolved = linker_->ResolveType(dex_file_, jval_.i, dex_cache_, class_loader_);
- field->SetObject(NULL, resolved);
+ field->SetObject(field->GetDeclaringClass(), resolved);
break;
}
default: UNIMPLEMENTED(FATAL) << ": type " << type_;