summaryrefslogtreecommitdiff
path: root/Source/DSPTool/DSPTool.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-06-13 17:56:49 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-06-14 12:22:06 -0700
commitdc353ed84d780c0a7bd2c6d98e893a6db304933e (patch)
tree7598d587fc118d9ee8de0a4417a27f367fb03a35 /Source/DSPTool/DSPTool.cpp
parent693a29f8ceeb1166658d9c0752b6e84660077374 (diff)
DSPTool: Exit with status 1 if binary comparison fails
Diffstat (limited to 'Source/DSPTool/DSPTool.cpp')
-rw-r--r--Source/DSPTool/DSPTool.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/DSPTool/DSPTool.cpp b/Source/DSPTool/DSPTool.cpp
index 3c4b350479..41299771ce 100644
--- a/Source/DSPTool/DSPTool.cpp
+++ b/Source/DSPTool/DSPTool.cpp
@@ -128,7 +128,7 @@ static std::string CodesToHeader(const std::vector<std::vector<u16>>& codes,
return header;
}
-static void PerformBinaryComparison(const std::string& lhs, const std::string& rhs)
+static bool PerformBinaryComparison(const std::string& lhs, const std::string& rhs)
{
std::string binary_code;
@@ -138,7 +138,7 @@ static void PerformBinaryComparison(const std::string& lhs, const std::string& r
File::ReadFileToString(rhs, binary_code);
const std::vector<u16> code2 = DSP::BinaryStringBEToCode(binary_code);
- DSP::Compare(code1, code2);
+ return DSP::Compare(code1, code2);
}
static void PrintResults(const std::string& input_name, const std::string& output_name,
@@ -482,8 +482,7 @@ int main(int argc, const char* argv[])
if (compare)
{
- PerformBinaryComparison(input_name, output_name);
- return 0;
+ return PerformBinaryComparison(input_name, output_name) ? 0 : 1;
}
if (print_results)