From 14753d04b3a60fb1af5b93c70d8d1768258496dc Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 19 Mar 2019 17:32:57 +0800 Subject: [PATCH] Fix verifyOutputBuffer return value in printf (#103) 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 544072a7..ba4032c1 100644 --- a/test_conformance/printf/util_printf.c +++ b/test_conformance/printf/util_printf.c @@ -859,14 +859,14 @@ 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;