Skip to content

Commit

Permalink
Fix array deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Tkachenko committed Jan 15, 2021
1 parent 0632128 commit 46ba7a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/redis-cpp/resp/deserialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ class array final
std::getline(stream, string);
auto count = std::stoll(string);
if (count < 0)
{
is_null_ = true;
return;
}
if (count < 1)
return;
items_.reserve(static_cast<typename items_type::size_type>(count));
Expand Down

0 comments on commit 46ba7a1

Please sign in to comment.