Skip to content

Commit

Permalink
Ensure compability check actually checks the type for files
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Oct 6, 2023
1 parent 1da0e34 commit 38efb87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/command_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ template <> struct target_type_id<core::Download*, core::Download*> { static con
template <> inline bool
is_target_compatible<target_type>(const target_type& target) { return true; }
template <> inline bool
is_target_compatible<torrent::File*>(const target_type& target) { return target.first == command_base::target_file || command_base::target_file_itr; }
is_target_compatible<torrent::File*>(const target_type& target) { return (target.first == target_type_id<torrent::File*>::value || target.first == command_base::target_file_itr); }

template <> inline target_type
get_target_cast<target_type>(target_type target, int type) { return target; }
Expand Down

0 comments on commit 38efb87

Please sign in to comment.