summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/html.c b/html.c
index 5684806..0924d4f 100644
--- a/html.c
+++ b/html.c
@@ -3442,15 +3442,16 @@ int html_post_handler(const xs_dict *req, const char *q_path,
3442 /* multiple choices? */ 3442 /* multiple choices? */
3443 if (xs_type(opt) == XSTYPE_LIST) 3443 if (xs_type(opt) == XSTYPE_LIST)
3444 ls = xs_dup(opt); 3444 ls = xs_dup(opt);
3445 else { 3445 else
3446 if (xs_type(opt) == XSTYPE_STRING) {
3446 ls = xs_list_new(); 3447 ls = xs_list_new();
3447 ls = xs_list_append(ls, opt); 3448 ls = xs_list_append(ls, opt);
3448 } 3449 }
3449 3450
3450 xs_list *p = ls;
3451 const xs_str *v; 3451 const xs_str *v;
3452 int c = 0;
3452 3453
3453 while (xs_list_iter(&p, &v)) { 3454 while (xs_list_next(ls, &v, &c)) {
3454 xs *msg = msg_note(&snac, "", actor, irt, NULL, 1); 3455 xs *msg = msg_note(&snac, "", actor, irt, NULL, 1);
3455 3456
3456 /* set the option */ 3457 /* set the option */
@@ -3463,7 +3464,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
3463 timeline_add(&snac, xs_dict_get(msg, "id"), msg); 3464 timeline_add(&snac, xs_dict_get(msg, "id"), msg);
3464 } 3465 }
3465 3466
3466 { 3467 if (ls != NULL) {
3467 /* get the poll object */ 3468 /* get the poll object */
3468 xs *poll = NULL; 3469 xs *poll = NULL;
3469 3470