From f10ee34dd806577144a8e6009265d813ad03cae2 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 19 Mar 2019 17:33:07 +0800 Subject: [PATCH] Fix verifyOutputBuffer return value in printf (#102) 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 842a0f74..f9f72e51 100644 --- a/test_conformance/printf/util_printf.c +++ b/test_conformance/printf/util_printf.c @@ -855,14 +855,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;