Skip to content

Commit

Permalink
mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)
Browse files Browse the repository at this point in the history
Apply de morgan to simplify the logic.
  • Loading branch information
SmallJoker authored and est31 committed Apr 15, 2016
1 parent 6530ed4 commit d82c5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/mainmenu/common.lua
Expand Up @@ -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)
Expand Down

0 comments on commit d82c5da

Please sign in to comment.