summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-05 22:16:23 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-05 22:18:10 -0700
commit09e312abd6dca9e2e55050d3d4eacfd52fea8d73 (patch)
tree37029a5aa450194b4b7db12dcd3fb5168b884252 /src
parent44ed9b5cb575883ba605632ac0db36b9aa99813b (diff)
Another try at getting snprintf part to compile on Windows.
Diffstat (limited to 'src')
-rw-r--r--src/latex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/latex.c b/src/latex.c
index b9500bd..0148ec3 100644
--- a/src/latex.c
+++ b/src/latex.c
@@ -409,13 +409,13 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
cr(state);
list_number = cmark_node_get_list_start(node);
if (list_number > 1) {
+#ifdef HAVE_C99_SNPRINTF
len = snprintf(list_number_string, 19,
"%d", list_number);
-#ifndef HAVE_C99_SNPRINTF
+#else
// Assume we're on Windows.
- if (len < 0) {
- len = _snprintf("%d", list_number);
- }
+ len = _snprintf("%d", 19,
+ "%d", list_number);
#endif
lit(state, "\\setcounter{enum", false);
lit(state, (char *)roman_numerals[state->enumlevel],