summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-04-27 08:30:56 +0200
committerdefault <nobody@localhost>2024-04-27 08:30:56 +0200
commit6bcb248254b32f86e6f07a73ef2db632e79a01d7 (patch)
treedca2b7597d2eaf2d9e69a9677539482df199176c
parentbe935b32c6a83de5ec39519bcb06e37edc373a2f (diff)
mastoapi: Fixed login bug.
-rw-r--r--mastoapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index fa01680..7ffcbce 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -291,7 +291,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
*body = xs_dup(code);
}
else {
- if (xs_str_in(redir, "?"))
+ if (xs_str_in(redir, "?") != -1)
*body = xs_fmt("%s&code=%s", redir, code);
else
*body = xs_fmt("%s?code=%s", redir, code);