X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/c9e3dd510e2efe011ddb00723d7ac694bd3eeaa3..1bef7e7d601a8c5f1d23602bb3f85c4868fd9bf0:/AaptAssets.cpp diff --git a/AaptAssets.cpp b/AaptAssets.cpp index d6cfb12..2b2ec7b 100644 --- a/AaptAssets.cpp +++ b/AaptAssets.cpp @@ -685,13 +685,11 @@ bool AaptGroupEntry::getMncName(const char* name, if (*c != 0) return false; if (c-val == 0 || c-val > 3) return false; - int d = atoi(val); - if (d != 0) { - if (out) out->mnc = d; - return true; + if (out) { + out->mnc = atoi(val); } - return false; + return true; } /* @@ -1830,6 +1828,16 @@ ssize_t AaptAssets::slurpResourceTree(Bundle* bundle, const String8& srcDir) continue; } + if (bundle->getMaxResVersion() != NULL && group.version.length() != 0) { + int maxResInt = atoi(bundle->getMaxResVersion()); + const char *verString = group.version.string(); + int dirVersionInt = atoi(verString + 1); // skip 'v' in version name + if (dirVersionInt > maxResInt) { + fprintf(stderr, "max res %d, skipping %s\n", maxResInt, entry->d_name); + continue; + } + } + FileType type = getFileType(subdirName.string()); if (type == kFileTypeDirectory) {