From 447d883f08695967f3739b938e2b4712faa8c343 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Mon, 12 Jun 2017 22:20:52 +0800 Subject: [PATCH] Fix minimum bytes size bug --- src/request_handlers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request_handlers.cpp b/src/request_handlers.cpp index 0cd8a35..5eccbfc 100644 --- a/src/request_handlers.cpp +++ b/src/request_handlers.cpp @@ -367,7 +367,7 @@ CQHTTP_REQUEST_HANDLER(get_group_member_list) int64_t group_id = cqhttp_get_integer_param(request, "group_id", 0); if (group_id) { string bytes = base64_decode(gbk_to_utf8(CQ_getGroupMemberList(ac, group_id))); - if (bytes.size() >= 10 /* minimum valid bytes size */) { + if (bytes.size() >= 4 /* minimum valid bytes size */) { INIT(bytes); int32_t count; INTEGER(count); // get number of group members @@ -461,7 +461,7 @@ CQHTTP_REQUEST_HANDLER(get_group_list) (const struct cqhttp_request &request) { struct cqhttp_result result; string bytes = base64_decode(gbk_to_utf8(CQ_getGroupList(ac))); - if (bytes.size() >= 10 /* minimum valid bytes size */) { + if (bytes.size() >= 4 /* minimum valid bytes size */) { INIT(bytes); int32_t count; INTEGER(count); // get number of groups