summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager2.cpp
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2023-11-21 08:15:13 -0800
committer Yurii Zubrytskyi <zyy@google.com> 2023-11-21 08:15:13 -0800
commitf48a56f6c09a177066c428ac03689c3f6c3de51f (patch)
tree6bdb381c71901caffdc472a65ad71f8566384c9e /libs/androidfw/AssetManager2.cpp
parent7a4bca8a418dc072ba21bac1d6f2e64ed74f4400 (diff)
[res] Fix the cookie index in OpenNonAsset()
Previous change incorrectly set the output cookie index, forgetting to account for the -1 offset Bug: 312057285 Test: manual Change-Id: Ib4ce95a3084f7faf83ac4875184f331407a1bd50
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
-rw-r--r--libs/androidfw/AssetManager2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index d056248273b2..8748dab581bb 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -603,7 +603,7 @@ std::unique_ptr<Asset> AssetManager2::OpenNonAsset(const std::string& filename,
std::unique_ptr<Asset> asset = assets->GetAssetsProvider()->Open(filename, mode);
if (asset) {
if (out_cookie != nullptr) {
- *out_cookie = i;
+ *out_cookie = i - 1;
}
return asset;
}