Use "sprintf" instead of "snprintf" because cygwin doesn't support "snprintf"
This commit is contained in:
parent
b553521578
commit
dcc917a6b4
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue