From 82e2fa96eada0b1c33b188c2e6e5f5cc8656aaa9 Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Mon, 8 Nov 2004 19:12:58 +0000 Subject: include/cppunit/TestAssert.h: fixed portability bug pointed out by Neil Ferguson. --- include/cppunit/TestAssert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/cppunit') diff --git a/include/cppunit/TestAssert.h b/include/cppunit/TestAssert.h index 8348a1b..14b9aff 100644 --- a/include/cppunit/TestAssert.h +++ b/include/cppunit/TestAssert.h @@ -76,7 +76,7 @@ struct assertion_traits const int precision = 15; #endif // #ifdef DBL_DIG char buffer[128]; - sprintf(buffer, "%.*g", DBL_DIG, x); + sprintf(buffer, "%.*g", precision, x); return buffer; } }; -- cgit v1.2.1