summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index dbb9c1aed..702a7550d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8540,14 +8540,14 @@ static AtCommandInfo* get_atcommandinfo_byname(const char* name)
int i;
if( *name == atcommand_symbol ) name++; // for backwards compatibility
ARR_FIND( 0, ARRAYLENGTH(atcommand_info), i, strcmpi(atcommand_info[i].command, name) == 0 );
- return ( i != ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
}
static AtCommandInfo* get_atcommandinfo_byfunc(const AtCommandFunc func)
{
int i;
ARR_FIND( 0, ARRAYLENGTH(atcommand_info), i, atcommand_info[i].func == func );
- return ( i != ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
}