Correctly handle commands that are flagged as not using targets

Fixes #1346
This commit is contained in:
kannibalox
2024-12-24 12:58:20 -05:00
committed by Jari Sundell
parent 3c65afcf8c
commit 8f0331625a
2 changed files with 11 additions and 4 deletions
+3
View File
@@ -59,6 +59,9 @@ private:
void
XmlRpc::object_to_target(const torrent::Object& obj, int callFlags, rpc::target_type* target) {
if (callFlags & CommandMap::flag_no_target)
return;
if (!obj.is_string()) {
throw torrent::input_error("invalid parameters: target must be a string");
}