sf/tipc: treat min/max as true min/max, rather than numeric

This commit is contained in:
Michael Scire
2021-05-12 22:43:39 -07:00
parent 99d7f72c51
commit 7e05e12b83
2 changed files with 7 additions and 3 deletions

View File

@@ -54,7 +54,10 @@ namespace ams::sf::cmif {
Result (*handler)(CmifOutHeader **out_header_ptr, ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data);
constexpr inline bool Matches(u32 cmd_id, hos::Version hosver) const {
return this->cmd_id == cmd_id && this->hosver_low <= hosver && hosver <= this->hosver_high;
const bool min_valid = this->hosver_low == hos::Version_Min;
const bool max_valid = this->hosver_high == hos::Version_Max;
return this->cmd_id == cmd_id && (min_valid || this->hosver_low <= hosver) && (max_valid || hosver <= this->hosver_high);
}
constexpr inline decltype(handler) GetHandler() const {