diff options
| -rw-r--r-- | tools/aapt/Resource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 6ebf41f1..cc9207d 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -553,7 +553,7 @@ static int validateAttr(const String8& path, const ResTable& table, String8(parser.getElementName(&len)).string(), attr); return ATTR_LEADING_SPACES; } - if (str[len-1] == ' ') { + if (len != 0 && str[len-1] == ' ') { fprintf(stderr, "%s:%d: Tag <%s> attribute %s can not end with a space.\n", path.string(), parser.getLineNumber(), String8(parser.getElementName(&len)).string(), attr); |
