From 97f0f1e4ea9232e86ee839d5d9e5e6d029f3700c Mon Sep 17 00:00:00 2001 From: Yurii Zubrytskyi Date: Tue, 2 Jul 2024 15:31:01 -0700 Subject: [aapt2] Improve dump chunks for string pools, fix diff - `dump chunks` command now prints extra header data for the string pool, and outputs all style information for styled strings. - `diff` command used to only correctly compare the first span in the StyledString data type, making them appear different if there was a string with more than one span Flag: EXEMPT bugfix Test: atest aapt2_tests Change-Id: I377718c03d6a464cb4db22399b0f067e6a6e04d6 --- libs/androidfw/StringPool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/androidfw/StringPool.cpp') diff --git a/libs/androidfw/StringPool.cpp b/libs/androidfw/StringPool.cpp index 1cb8df311c89..ad445c042e63 100644 --- a/libs/androidfw/StringPool.cpp +++ b/libs/androidfw/StringPool.cpp @@ -132,7 +132,7 @@ bool StringPool::StyleRef::operator==(const StyleRef& rhs) const { auto rhs_iter = rhs.entry_->spans.begin(); for (const Span& span : entry_->spans) { - const Span& rhs_span = *rhs_iter; + const Span& rhs_span = *rhs_iter++; if (span.first_char != rhs_span.first_char || span.last_char != rhs_span.last_char || span.name != rhs_span.name) { return false; -- cgit v1.2.3-59-g8ed1b