ExtraCommands+ForceInputs: Prevent strncmp with -1 (Crashes on newer sourcemods)
This commit is contained in:
parent
7f96f547c9
commit
2367266604
@ -1281,7 +1281,9 @@ public Action Command_WAILA(int client, int argc)
|
|||||||
char sArgument[256];
|
char sArgument[256];
|
||||||
GetCmdArg(1, sArgument, sizeof(sArgument));
|
GetCmdArg(1, sArgument, sizeof(sArgument));
|
||||||
|
|
||||||
int Wildcard = FindCharInString(sArgument, '*');
|
int Wildcard = -1;
|
||||||
|
if((Wildcard = FindCharInString(sArgument, '*')) == -1)
|
||||||
|
Wildcard = 256;
|
||||||
|
|
||||||
int entity = INVALID_ENT_REFERENCE;
|
int entity = INVALID_ENT_REFERENCE;
|
||||||
while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
|
while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
|
||||||
|
@ -168,7 +168,9 @@ public Action Command_ForceInput(int client, int args)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int Wildcard = FindCharInString(sArguments[0], '*');
|
int Wildcard = -1;
|
||||||
|
if((Wildcard = FindCharInString(sArguments[0], '*')) == -1)
|
||||||
|
Wildcard = 256;
|
||||||
|
|
||||||
int entity = INVALID_ENT_REFERENCE;
|
int entity = INVALID_ENT_REFERENCE;
|
||||||
while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
|
while((entity = FindEntityByClassname(entity, "*")) != INVALID_ENT_REFERENCE)
|
||||||
|
Loading…
Reference in New Issue
Block a user