commit 207d9e0
green
·
2025-04-13 19:23:01 +0000 UTC
parent 50129db
small: fix segfault for poll options
1 files changed,
+2,
-1
M
html.c
M
html.c
+2,
-1
1@@ -780,7 +780,8 @@ xs_html *html_note(snac *user, const char *summary,
2 if (poll) {
3 const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options");
4 xs *poll_limit_str = xs_dup(L("Poll options (one per line, up to 8):"));
5- poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options));
6+ if (max_options != NULL)
7+ poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options));
8
9 xs_html_add(form,
10 xs_html_tag("p", NULL),