Stack Trace Element with its unit test added too.
The unit test passes.
Change-Id: I6f6af771cae1387c60c3b511148a347fe3237345
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 3489086..01eb099 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -532,7 +532,10 @@
return static_cast<ValueType>(type);
}
-String* DexFile::dexArtStringById(uint32_t idx) const {
+String* DexFile::dexArtStringById(int32_t idx) const {
+ if (idx == -1) {
+ return NULL;
+ }
return String::AllocFromModifiedUtf8(dexStringById(idx));
}