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 1, 2023
1 parent 199e8f8 commit ff2cf60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/rpc/command_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ is_target_compatible<target_type>(const target_type&) {
template<>
inline bool
is_target_compatible<torrent::File*>(const target_type& target) {
return std::get<0>(target) == command_base::target_file ||
command_base::target_file_itr;
return (std::get<0>(target) == command_base::target_file ||
command_base::target_file_itr) &&
std::get<0>(target) == target_type_id<torrent::File*>::value;
}

template<>
Expand Down

0 comments on commit ff2cf60

Please sign in to comment.