Skip to content
Permalink
Browse files

mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)

Apply de morgan to simplify the logic.
  • Loading branch information
SmallJoker authored and est31 committed Apr 15, 2016
1 parent 6530ed4 commit d82c5da0dccb1f30250725d17c3f373aacdda0e2
Showing with 1 addition and 1 deletion.
  1. +1 −1 builtin/mainmenu/common.lua
@@ -290,7 +290,7 @@ end

--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
function is_server_protocol_compat_or_error(server_proto_min, server_proto_max)

0 comments on commit d82c5da

Please sign in to comment.