summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-30 21:11:06 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-30 21:11:06 -0700
commitd4047b95a4d8564ef6959a4fb63fc2e2e0708399 (patch)
tree8639c1767a4f14bb9c6eb868d29fbbae01a98a5e
parentba5e6434e2ab94d617637ea21abf840f97ba6593 (diff)
parentb4ac6eb92cce438632e44de80ab81c83198b2360 (diff)
Merge pull request #22 from yangcha/master
snprintf is not implemented in Visual Studio 2013 or earlier. Use _snpri...
-rw-r--r--src/commonmark.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index 23faa7c..31fdcec 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -11,6 +11,10 @@
#include "utf8.h"
#include "scanners.h"
+#if defined(_MSC_VER) && (_MSC_VER <=1800)
+#define snprintf _snprintf
+#endif
+
// Functions to convert cmark_nodes to commonmark strings.
struct render_state {