From 0654d2715db331363de74d634aa945593a86aff3 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 19 Mar 2019 17:32:47 +0800 Subject: [PATCH] Fix verifyOutputBuffer return value in printf (#104) Function verifyOutputBuffer returns non-zero value in case of mismatch. Return value 'false' means some mismatches are treated as matches. This commit fix this problem. --- test_conformance/printf/util_printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_conformance/printf/util_printf.c b/test_conformance/printf/util_printf.c index 7d297f2b..da0a6343 100644 --- a/test_conformance/printf/util_printf.c +++ b/test_conformance/printf/util_printf.c @@ -856,12 +856,12 @@ size_t verifyOutputBuffer(char *analysisBuffer,testCase* pTestCase,size_t testId char* eCorrectBuffer = strstr((char*)pTestCase->_correctBuffer[testId],correctExp); if(eCorrectBuffer == NULL) - return false; + return 1; eCorrectBuffer+=2; exp += 2; //Exponent always contains at least two digits if(strlen(exp) < 2) - return false; + return 1; //Scip leading zeros in the exponent while(*exp == '0') ++exp;