1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-21 20:27:13 +01:00

Improve argument type compatibility check inside command listeners.

This commit is contained in:
Sandu Liviu Catalin 2016-07-14 22:16:27 +03:00
parent 498c02fa83
commit 34feeb7903

View File

@ -1800,9 +1800,7 @@ public:
// Retrieve the argument flags // Retrieve the argument flags
const Uint8 f = m_ArgSpec[arg]; const Uint8 f = m_ArgSpec[arg];
// Perform the requested check // Perform the requested check
return (f == CMDARG_ANY) || // Requires check? return (f == CMDARG_ANY) || ((f & flag) != 0x0);
(f & flag) || // Exact match?
((f & CMDARG_GREEDY) && (flag & CMDARG_STRING));
} }
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------