From 9da717946b5ac4180d53b571967f90d1120dad76 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Tue, 28 Jul 2020 12:01:02 +0000 Subject: [PATCH] Fix conditionals in the first and third parameter when user inputs like `calc 4 - +` --- qcsrc/server/command/cmd.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2