From d82c5da0dccb1f30250725d17c3f373aacdda0e2 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Fri, 15 Apr 2016 14:37:09 +0200 Subject: [PATCH] mainmenu: Tidy up logic in is_server_protocol_compat() (#3997) Apply de morgan to simplify the logic. --- builtin/mainmenu/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index b9a010e61..3dd7d8b4a 100644 --- a/builtin/mainmenu/common.lua +++ b/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)