summaryrefslogtreecommitdiff
path: root/src/man.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/man.c')
-rw-r--r--src/man.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/man.c b/src/man.c
index 99a2803..2ce7540 100644
--- a/src/man.c
+++ b/src/man.c
@@ -110,8 +110,9 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
tmp = tmp->prev;
list_number += 1;
}
- char list_number_s[20];
- sprintf(list_number_s, "\"%d.\" 4", list_number);
+ const size_t LIST_NUMBER_SIZE = 20;
+ char list_number_s[LIST_NUMBER_SIZE];
+ snprintf(list_number_s, LIST_NUMBER_SIZE, "\"%d.\" 4", list_number);
LIT(list_number_s);
}
CR();