Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Fix minimum bytes size bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stdrc committed Jun 12, 2017
1 parent 235b280 commit 447d883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/request_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 447d883

Please sign in to comment.