From dcc917a6b49ec1ef2ad011f190d0b1b112a417ac Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Sun, 15 Sep 2013 01:38:21 -0700 Subject: [PATCH] Use "sprintf" instead of "snprintf" because cygwin doesn't support "snprintf" --- src/util/numerics/mpfp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/numerics/mpfp.cpp b/src/util/numerics/mpfp.cpp index 49f54693a..c1fbfa2d9 100644 --- a/src/util/numerics/mpfp.cpp +++ b/src/util/numerics/mpfp.cpp @@ -42,7 +42,7 @@ inline unsigned necessary_digits(mpfr_prec_t p) { std::ostream & operator<<(std::ostream & out, mpfp const & v) { char * s = nullptr; char format[128]; - snprintf(format, sizeof(format), "%%.%dRNg", necessary_digits(mpfr_get_prec(v.m_val))); + sprintf(format, "%%.%dRNg", necessary_digits(mpfr_get_prec(v.m_val))); // NOLINT mpfr_asprintf(&s, format, v.m_val); std::string str = std::string(s); mpfr_free_str(s);