From: Morgan Deters Date: Tue, 2 Oct 2012 02:57:59 +0000 (+0000) Subject: workaround for a nasty CLN bug X-Git-Tag: cvc5-1.0.0~7752 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e283659af0f95505e92a1826953509537f9d216;p=cvc5.git workaround for a nasty CLN bug --- diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h index 5dfcae6d2..b86e0240c 100644 --- a/src/util/integer_cln_imp.h +++ b/src/util/integer_cln_imp.h @@ -60,7 +60,12 @@ private: void readInt(const cln::cl_read_flags& flags, const std::string& s, unsigned base) throw(std::invalid_argument) { try { - d_value = read_integer(flags, s.c_str(), NULL, NULL); + if(s.find_first_not_of('0') == std::string::npos) { + // string of all zeroes, CLN has a bug for these inputs + d_value = read_integer(flags, "0", NULL, NULL); + } else { + d_value = read_integer(flags, s.c_str(), NULL, NULL); + } } catch(...) { std::stringstream ss; ss << "Integer() failed to parse value \"" << s << "\" in base " << base;