From: LegendaryGuard Date: Tue, 28 Jul 2020 12:01:02 +0000 (+0000) Subject: Fix conditionals in the first and third parameter when user inputs like `calc 4 - +` X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9da717946b5ac4180d53b571967f90d1120dad76;p=xonotic%2Fxonotic-data.pk3dir.git Fix conditionals in the first and third parameter when user inputs like `calc 4 - +` --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 4e1dc5291..fc81ea5bb 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -109,11 +109,11 @@ void ClientCommand_calc(entity caller, int request, int argc) { if (argv(1) != "") { - if (argv(1) != "+" || argv(1) != "-" || argv(1) != "*" || argv(1) != "/" || argv(1) != "^" || argv(1) != "%") + if (argv(1) != "+" && argv(1) != "-" && argv(1) != "*" && argv(1) != "/" && argv(1) != "^" && argv(1) != "%") { if (argv(2) == "+" || argv(2) == "-" || argv(2) == "*" || argv(2) == "/" || argv(2) == "^" || argv(2) == "%") { - if (argv(3) != "+" || argv(3) != "-" || argv(3) != "*" || argv(3) != "/" || argv(3) != "^" || argv(3) != "%") + if (argv(3) != "+" && argv(3) != "-" && argv(3) != "*" && argv(3) != "/" && argv(3) != "^" && argv(3) != "%") { string operator; float num1, num2, result;