summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5ec8b49..2b7f062 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -175,6 +175,12 @@ int cmark_strbuf_vprintf(cmark_strbuf *buf, const char *format, va_list ap)
buf->asize - buf->size,
format, args
);
+#ifndef HAVE_C99_SNPRINTF
+ // Assume we're on Windows.
+ if (len < 0) {
+ len = _vscprintf(format, args);
+ }
+#endif
va_end(args);