From 07a3e200a0aa8d6c1e3356bfdf97ff54dd0df488 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Mon, 14 Jan 2013 18:02:40 -0800 Subject: [PATCH] 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 --- Command.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Command.cpp b/Command.cpp index b98925b..c3a0930 100644 --- a/Command.cpp +++ b/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] = { -- 2.45.2