diff options
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -145,6 +145,12 @@ mpfr_snprintf (char *buf, size_t size, const char *fmt, ...) { va_list ap; int ret; + + if (size == 0) + return 0; + + MPFR_ASSERTD (buf != NULL); + va_start (ap, fmt); ret = mpfr_vsnprintf (buf, size, fmt, ap); |