diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2020-11-16 23:08:18 +0000 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2020-12-08 16:58:12 +0000 |
commit | 80094e39f90801c44cd80ab0f98df505828ea1f3 (patch) | |
tree | e70d5241691a509ce9cf774dc39ce85932fdd1d2 /cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp | |
parent | ec7e7f5622e3444a3003db20ddfd8f5745971fa7 (diff) |
Revert^2 "libandroidfw hardening for IncFs"
55ef6167a2c235bd88c7216238b2001b46795b79
Change-Id: I02d4890d181655dfd0a14c188468db512559d27b
Merged-In: I02d4890d181655dfd0a14c188468db512559d27b
Diffstat (limited to 'cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp')
-rw-r--r-- | cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp index a93202a64d31..3037a791328e 100644 --- a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp +++ b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp @@ -100,10 +100,9 @@ void PrettyPrintVisitor::visit(const IdmapData& data) { stream_ << TAB << base::StringPrintf("0x%08x -> ", target_entry.target_id) << utils::DataTypeToString(target_entry.value.data_type); - size_t unused; if (target_entry.value.data_type == Res_value::TYPE_STRING) { - auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset, &unused); - stream_ << " \"" << StringPiece16(str) << "\""; + auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset); + stream_ << " \"" << str.value_or(StringPiece16(u"")) << "\""; } else { stream_ << " " << base::StringPrintf("0x%08x", target_entry.value.data_value); } |