diff options
Diffstat (limited to 'tools/aapt/StringPool.cpp')
-rw-r--r-- | tools/aapt/StringPool.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp index 9908c44c6d1f..866291a3b678 100644 --- a/tools/aapt/StringPool.cpp +++ b/tools/aapt/StringPool.cpp @@ -14,12 +14,8 @@ // SSIZE: mingw does not have signed size_t == ssize_t. #if !defined(_WIN32) -# define ZD "%zd" -# define ZD_TYPE ssize_t # define SSIZE(x) x #else -# define ZD "%ld" -# define ZD_TYPE long # define SSIZE(x) (signed size_t)x #endif @@ -390,12 +386,12 @@ sp<AaptFile> StringPool::createStringBlock() #define ENCODE_LENGTH(str, chrsz, strSize) \ { \ - size_t maxMask = 1 << ((chrsz*8)-1); \ + size_t maxMask = 1 << (((chrsz)*8)-1); \ size_t maxSize = maxMask-1; \ - if (strSize > maxSize) { \ - *str++ = maxMask | ((strSize>>(chrsz*8))&maxSize); \ + if ((strSize) > maxSize) { \ + *(str)++ = maxMask | (((strSize)>>((chrsz)*8))&maxSize); \ } \ - *str++ = strSize; \ + *(str)++ = strSize; \ } status_t StringPool::writeStringBlock(const sp<AaptFile>& pool) |