From 4f2d7da13634fad44c9a62064ee0a60c23191e5f Mon Sep 17 00:00:00 2001 From: Francois Berder <18538310+francois-berder@users.noreply.github.com> Date: Wed, 28 Aug 2019 09:41:54 +0100 Subject: [PATCH] Fix main return value if compressing Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com> --- src/lzsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lzsa.c b/src/lzsa.c index 939a2c9..8004153 100755 --- a/src/lzsa.c +++ b/src/lzsa.c @@ -1054,7 +1054,9 @@ int main(int argc, char **argv) { if (cCommand == 'z') { int nResult = do_compress(pszInFilename, pszOutFilename, pszDictionaryFilename, nOptions, nMinMatchSize, nFormatVersion); if (nResult == 0 && bVerifyCompression) { - nResult = do_compare(pszOutFilename, pszInFilename, pszDictionaryFilename, nOptions, nFormatVersion); + return do_compare(pszOutFilename, pszInFilename, pszDictionaryFilename, nOptions, nFormatVersion); + } else { + return nResult; } } else if (cCommand == 'd') {