mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)
Apply de morgan to simplify the logic.
This commit is contained in:
@@ -290,7 +290,7 @@ end
|
|||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
function is_server_protocol_compat(server_proto_min, server_proto_max)
|
function is_server_protocol_compat(server_proto_min, server_proto_max)
|
||||||
return not ((min_supp_proto > (server_proto_max or 24)) or (max_supp_proto < (server_proto_min or 13)))
|
return min_supp_proto <= (server_proto_max or 24) and max_supp_proto >= (server_proto_min or 13)
|
||||||
end
|
end
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
function is_server_protocol_compat_or_error(server_proto_min, server_proto_max)
|
function is_server_protocol_compat_or_error(server_proto_min, server_proto_max)
|
||||||
|
Reference in New Issue
Block a user