Skip to content

Commit

Permalink
Merge pull request OpenAtomFoundation#175 from fancy-rabbit/fix_slot_num
Browse files Browse the repository at this point in the history
slot: slot_num 0 should be valid
  • Loading branch information
baotiao authored Aug 16, 2017
2 parents 979892f + 5fbeb3c commit 80e1bcf
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 80e1bcf

Please sign in to comment.