Skip to content

Commit

Permalink
Merge pull request #320 from popsky/master
Browse files Browse the repository at this point in the history
Fix bug: redis_client get_string not comsume ending \r\n on empty string
  • Loading branch information
zhengshuxin authored Dec 18, 2023
2 parents 1331b42 + cfb83b0 commit fd9a491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib_acl_cpp/src/redis/redis_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ redis_result* redis_client::get_string(socket_stream& conn, dbuf_pool* dbuf)
redis_result* rr = new(dbuf) redis_result(dbuf);
rr->set_type(REDIS_RESULT_STRING);
int len = atoi(sbuf.c_str());
if (len <= 0) {
if (len < 0) {
return rr;
}

Expand Down

0 comments on commit fd9a491

Please sign in to comment.