fix: consume parser error on dfly load (#4556)

* fix dcheck crash on dfly load
* fix dfly load with more than required arguments

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2025-02-05 10:11:04 +02:00 committed by GitHub
parent dc3a91e083
commit a40b5063e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -528,11 +528,7 @@ void DflyCmd::Load(CmdArgList args, RedisReplyBuilder* rb, ConnectionContext* cn
existing_keys = ServerFamily::LoadExistingKeys::kOverride;
}
if (parser.HasNext()) {
parser.Error();
}
if (parser.HasError()) {
if (parser.Error() || parser.HasNext()) {
return rb->SendError(kSyntaxErr);
}