Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Iam-WenYi committed Aug 30, 2024
1 parent 5da7c2d commit 7968e0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd_kv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,9 @@ void SetRangeCmd::DoCmd(PClient* client) {
return;
}
// Ref: https://redis.io/docs/latest/commands/setrange/
if (g_config.redis_compatible_mode && std::atoi(client->argv_[2].c_str()) > 536870911)
{
client->SetRes(CmdRes::kErrOther, "When Redis compatibility mode is enabled, the offset parameter must not exceed 536870911");
if (g_config.redis_compatible_mode && std::atoi(client->argv_[2].c_str()) > 536870911) {
client->SetRes(CmdRes::kErrOther,
"When Redis compatibility mode is enabled, the offset parameter must not exceed 536870911");
return;
}
int32_t ret = 0;
Expand Down

0 comments on commit 7968e0c

Please sign in to comment.