RedisConnection::ReadRESP(): *-1\r\n is null, not [ ]

This commit is contained in:
Alexander A. Klimov 2022-04-14 17:04:30 +02:00
parent 4522522444
commit 2c3d2f8b87
1 changed files with 3 additions and 3 deletions

View File

@ -555,12 +555,12 @@ Value RedisConnection::ReadRESP(AsyncReadStream& stream, boost::asio::yield_cont
throw BadRedisInt(std::move(buf));
}
Array::Ptr arr = new Array();
if (i < 0) {
i = 0;
return Empty;
}
Array::Ptr arr = new Array();
arr->Reserve(i);
for (; i; --i) {