Skip to content

Commit

Permalink
slot: slot_num 0 should be valid
Browse files Browse the repository at this point in the history
  • Loading branch information
fancy-rabbit committed Aug 15, 2017
1 parent 979892f commit 5fbeb3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pika_slot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ void SlotsMgrtTagSlotCmd::DoInitial(PikaCmdArgsType &argv, const CmdInfo* const
}

std::string str_slot_num = *it++;
if (!slash::string2l(str_slot_num.data(), str_slot_num.size(), &slot_num_) || slot_num_ <= 0) {
if (!slash::string2l(str_slot_num.data(), str_slot_num.size(), &slot_num_) || slot_num_ < 0) {
res_.SetRes(CmdRes::kInvalidInt);
return;
}
Expand Down

0 comments on commit 5fbeb3c

Please sign in to comment.