summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-13 22:09:58 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-13 22:09:58 +0000
commit06bff5ca4d55db05bd46868e551b60807920b29f (patch)
tree3c32ace32f5afe43b7003b363efaff53db20bc22 /src/map/charcommand.c
parentc19d2cbb159a3f9ac7d5568c7c9b39008ca244e1 (diff)
downloadhercules-06bff5ca4d55db05bd46868e551b60807920b29f.tar.gz
hercules-06bff5ca4d55db05bd46868e551b60807920b29f.tar.bz2
hercules-06bff5ca4d55db05bd46868e551b60807920b29f.tar.xz
hercules-06bff5ca4d55db05bd46868e551b60807920b29f.zip
Replaced some foreach-based functions by their inlined iterator equivalents.
Changed the dynamic mobs system, so that the flag that indicates whether a particular mob can be unloaded is stored in the mob's respawn data structure. Cleaned up related parts of the source code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12358 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index bde5e7d2e..cd2c31749 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -3800,14 +3800,14 @@ static CharCommandInfo* get_charcommandinfo_byname(const char* name)
int i;
if( *name == charcommand_symbol ) name++; // for backwards compatibility
ARR_FIND( 0, ARRAYLENGTH(charcommand_info), i, strcmpi(charcommand_info[i].command, name) == 0 );
- return ( i != ARRAYLENGTH(charcommand_info) ) ? &charcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(charcommand_info) ) ? &charcommand_info[i] : NULL;
}
static CharCommandInfo* get_charcommandinfo_byfunc(const CharCommandFunc func)
{
int i;
ARR_FIND( 0, ARRAYLENGTH(charcommand_info), i, charcommand_info[i].func == func );
- return ( i != ARRAYLENGTH(charcommand_info) ) ? &charcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(charcommand_info) ) ? &charcommand_info[i] : NULL;
}