make AndroidXMLDecompress a little less kludgey

#623 https://gitlab.com/fdroid/fdroidclient/issues/623
This commit is contained in:
Hans-Christoph Steiner 2016-05-11 16:40:59 +02:00
parent 103b2265ee
commit 23dad31426

View File

@ -89,7 +89,8 @@ public class AndroidXMLDecompress {
} }
int offset = xmlTagOffset; int offset = xmlTagOffset;
while (offset < binaryXml.length) { // we only need the first <manifest> start tag
if (offset < binaryXml.length) {
int tag0 = littleEndianWord(binaryXml, offset); int tag0 = littleEndianWord(binaryXml, offset);
if (tag0 == START_TAG) { if (tag0 == START_TAG) {
@ -114,8 +115,6 @@ public class AndroidXMLDecompress {
} }
return attributes; return attributes;
} }
// we only need the first <manifest> start tag
break;
} }
return new HashMap<>(0); return new HashMap<>(0);
} }