From b1c40c9a649d37397fb96990f07a73c5ee9c0fc2 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Tue, 5 Apr 2022 03:25:11 +0000 Subject: [PATCH] Check boolean FossilOrigin-Name: 7601100a897fb67f13f5a4ca5e2e563f9cf1112738040d75a10b9db04bb68928 --- src/relationship.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/relationship.c b/src/relationship.c index b91344e..5b5452b 100644 --- a/src/relationship.c +++ b/src/relationship.c @@ -35,7 +35,8 @@ struct _mstdnt_relationship_flags_args static void _mstdnt_val_relationship_flag_call(cJSON* v, void* _type) { struct _mstdnt_relationship_flags_args* arg = _type; - *(arg->flags) |= arg->flag; + if (cJSON_IsTrue(v)) + *(arg->flags) |= arg->flag; } int mstdnt_relationship_json(struct mstdnt_relationship* relationship, cJSON* js)