From 2c16e3a249b8cfa2b697d03b378610ab8c2a55e3 Mon Sep 17 00:00:00 2001 From: kingcent Date: Sun, 25 Feb 2018 11:42:42 +0800 Subject: [PATCH] set right offset in resource.arsc --- lib/ResourceFinder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ResourceFinder.js b/lib/ResourceFinder.js index e474f6c..50a265d 100644 --- a/lib/ResourceFinder.js +++ b/lib/ResourceFinder.js @@ -99,6 +99,8 @@ ResourceFinder.prototype.processResourceTable = function(resourceBuffer) { if (size != bb.limit) { throw new Error("The buffer size not matches to the resource table size."); } + + bb.offset = headerSize; var realStringPoolCount = 0, realPackageCount = 0; @@ -511,4 +513,4 @@ ResourceFinder.prototype.putIntoMap = function(resId, value) { this.responseMap[resId.toUpperCase()] = valueList; }; -module.exports = ResourceFinder; \ No newline at end of file +module.exports = ResourceFinder;