From 71717edc58ab512e05509b2af156e1d0c3dd14f4 Mon Sep 17 00:00:00 2001 From: Julian Winkler Date: Sun, 26 May 2024 16:14:04 +0200 Subject: [PATCH] AssetManager: fix Asset XML file not found error on 32bit The xmlBlock variable is now a pointer with the recent changes. So, we shouldn't compare it with >= 0. The error went unnoticed, because it was only tested on 64bit until now --- src/api-impl/android/content/res/AssetManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api-impl/android/content/res/AssetManager.java b/src/api-impl/android/content/res/AssetManager.java index cf328c29..f8135b4b 100644 --- a/src/api-impl/android/content/res/AssetManager.java +++ b/src/api-impl/android/content/res/AssetManager.java @@ -472,7 +472,7 @@ public final class AssetManager { throw new RuntimeException("Assetmanager has been closed"); } xmlBlock = openXmlAssetNative(cookie, fileName); - if (xmlBlock >= 0) { + if (xmlBlock != 0) { XmlBlock res = new XmlBlock(this, xmlBlock); incRefsLocked(res.hashCode()); return res;