From e8d7a95f9416c67242db5e06fd1743c8f28b3b08 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 18 Oct 2007 08:04:53 +0000 Subject: Some code cleaning... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/charcommand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/charcommand.c') diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 88c32b307..dc16f399b 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -2578,11 +2578,11 @@ int charcommand_param(const int fd, struct map_session_data* sd, const char* com status[5] = &pl_sd->status.luk; index = -1; - for (index = 0; index < sizeof(param)/sizeof(param[0]); index++) { + for (index = 0; index < ARRAYLENGTH(param); index++) { if (strcmpi(command, param[index]) == 0) break; } - if (index == sizeof(param)/sizeof(param[0]) || index > MAX_STATUS_TYPE) { + if (index == ARRAYLENGTH(param) || index > MAX_STATUS_TYPE) { // normaly impossible... sprintf(output, "Please, enter a valid value (usage: #str,#agi,#vit,#int,#dex,#luk <+/-adjustment> )."); clif_displaymessage(fd, output); @@ -2964,7 +2964,7 @@ int charcommand_allstats(const int fd, struct map_session_data* sd, const char* count = 0; max = pc_maxparameter(pl_sd); - for (index = 0; index < (int)(sizeof(status) / sizeof(status[0])); index++) { + for (index = 0; index < ARRAYLENGTH(status); index++) { if (value > 0 && *status[index] > max - value) new_value = max; -- cgit v1.2.3-60-g2f50