From b75096dde1f691e14e0300acfb8ea648e7331b2a Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 28 Aug 2012 17:14:59 +0000 Subject: [PATCH] fix a bug in CLN rational printing where the base was ignored (was causing the new CVC3-compatibility-API system test to fail) --- src/util/rational_cln_imp.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/rational_cln_imp.h b/src/util/rational_cln_imp.h index 969a8b5eb..4247a1e63 100644 --- a/src/util/rational_cln_imp.h +++ b/src/util/rational_cln_imp.h @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include @@ -299,8 +301,11 @@ public: /** Returns a string representing the rational in the given base. */ std::string toString(int base = 10) const { + cln::cl_print_flags flags; + flags.rational_base = base; + flags.rational_readably = false; std::stringstream ss; - fprint(ss, d_value); + print_rational(ss, flags, d_value); return ss.str(); } -- 2.30.2