From: Ben Gruver Date: Thu, 8 Mar 2012 00:16:18 +0000 (-0800) Subject: Merge "Fix up getAttributeFlags() function" X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/ff618d5a3ab8c4854727be2b49cee98bf4c9da3c?hp=2ac58f0f8da20ec4af16b08e616c07d8caa93cf2 Merge "Fix up getAttributeFlags() function" --- diff --git a/ResourceTable.cpp b/ResourceTable.cpp index 0c0b2ea..df6abe8 100644 --- a/ResourceTable.cpp +++ b/ResourceTable.cpp @@ -2304,10 +2304,8 @@ bool ResourceTable::getAttributeFlags( const char16_t* end = name + nameLen; const char16_t* pos = name; - bool failed = false; - while (pos < end && !failed) { + while (pos < end) { const char16_t* start = pos; - end++; while (pos < end && *pos != '|') { pos++; } @@ -2333,9 +2331,7 @@ bool ResourceTable::getAttributeFlags( // Didn't find this flag identifier. return false; } - if (pos < end) { - pos++; - } + pos++; } return true;