Przeglądaj źródła

mastoapi: fixed bug in voting code.

Uilebheist 3 tygodni temu
rodzic
commit
f4d4718b35
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      mastoapi.c

+ 1 - 1
mastoapi.c

@@ -3951,7 +3951,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
 
 
                                     int c = 0;
                                     int c = 0;
                                     while (xs_list_next(choices, &v, &c)) {
                                     while (xs_list_next(choices, &v, &c)) {
-                                        int io           = atoi(v);
+                                        int io           = xs_number_get_l(v);
                                         const xs_dict *o = xs_list_get(opts, io);
                                         const xs_dict *o = xs_list_get(opts, io);
 
 
                                         if (o) {
                                         if (o) {