From 34feeb79039ca05f0e76afaf1a2960a8d56f9d49 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Thu, 14 Jul 2016 22:16:27 +0300 Subject: [PATCH] Improve argument type compatibility check inside command listeners. --- source/Command.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/Command.hpp b/source/Command.hpp index 65345538..b7cc6568 100644 --- a/source/Command.hpp +++ b/source/Command.hpp @@ -1800,9 +1800,7 @@ public: // Retrieve the argument flags const Uint8 f = m_ArgSpec[arg]; // Perform the requested check - return (f == CMDARG_ANY) || // Requires check? - (f & flag) || // Exact match? - ((f & CMDARG_GREEDY) && (flag & CMDARG_STRING)); + return (f == CMDARG_ANY) || ((f & flag) != 0x0); } /* --------------------------------------------------------------------------------------------