diff options
author | Xavier Ducrohet <xav@android.com> | 2013-01-14 18:02:40 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2013-01-15 10:37:20 -0800 |
commit | c75d3f5c10bf6d7718ef69c6bbc1cdf64cd8ff04 (patch) | |
tree | 89c04bb1b6f41275fa71aec9bf0df80ef701e59e /tools | |
parent | 22d7cf239d8a9b009ea7adf86d8826a8a8116d03 (diff) | |
download | frameworks_base-c75d3f5c10bf6d7718ef69c6bbc1cdf64cd8ff04.zip frameworks_base-c75d3f5c10bf6d7718ef69c6bbc1cdf64cd8ff04.tar.gz frameworks_base-c75d3f5c10bf6d7718ef69c6bbc1cdf64cd8ff04.tar.bz2 |
Fix the single crunch command to return the right error code.
Casting from status_t to int doesn't work for return values
if the lower 8 bits are all 0.
Change-Id: I88e910dfe46cb72acd1595352e71da3c8eff4ca9
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/Command.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index b98925b..c3a0930 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -1852,7 +1852,11 @@ int doSingleCrunch(Bundle* bundle) String8 input(bundle->getSingleCrunchInputFile()); String8 output(bundle->getSingleCrunchOutputFile()); - return preProcessImageToCache(bundle, input, output); + if (preProcessImageToCache(bundle, input, output) != NO_ERROR) { + // we can't return the status_t as it gets truncate to the lower 8 bits. + return 42; + } + return NO_ERROR; } char CONSOLE_DATA[2925] = { |