1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 01:33:12 +02:00

relay/api: replace direct access to JSON number value by call to function cJSON_GetNumberValue() (issue #2066)

This commit is contained in:
Sébastien Helleu
2024-03-31 21:03:56 +02:00
parent cb785d5035
commit 64db1b958d
2 changed files with 3 additions and 3 deletions
@@ -905,7 +905,7 @@ relay_remote_network_url_handshake_cb (const void *pointer,
/* hash iterations */
json_hash_iterations = cJSON_GetObjectItem (json_body, "password_hash_iterations");
if (json_hash_iterations && cJSON_IsNumber (json_hash_iterations))
remote->password_hash_iterations = json_hash_iterations->valueint;
remote->password_hash_iterations = (int)cJSON_GetNumberValue (json_hash_iterations);
/* TOTP */
json_totp = cJSON_GetObjectItem (json_body, "totp");
if (json_totp && cJSON_IsBool (json_totp))