From 1d79022fb4e56dffe0bbd075d47e00f7a0b62ab3 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 20 Jun 2026 14:56:05 +0200 Subject: [PATCH] fix: handle_gc_mod_list() return values in docs --- toxcore/group_chats.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index 7bc741e57..10e2f1219 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c @@ -3013,7 +3013,7 @@ static int validate_unpack_mod_list(GC_Chat *_Nonnull chat, const uint8_t *_Nonn * * Return 0 if packet is handled correctly. * Return -1 if packet has invalid size. - * Return -2 if packet contained invalid data or validation failed. + * Return -2 if packet contained invalid data. */ static int handle_gc_mod_list(const GC_Session *_Nonnull c, GC_Chat *_Nonnull chat, const uint8_t *_Nullable data, uint16_t length, void *_Nullable userdata) { @@ -3042,10 +3042,11 @@ static int handle_gc_mod_list(const GC_Session *_Nonnull c, GC_Chat *_Nonnull ch } if (unpack_ret == 1) { + // ignore bad hash return 0; } - // unpack/validation failed: handle error + // unpack failed: handle error if (chat->shared_state.version == 0) { chat->connection_state = CS_CONNECTING;