summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-09 22:42:56 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-09 22:42:56 +0000
commitf3753f1cd474a84748b88991f74bcaa4f590f4ff (patch)
tree4e0f2fae76761e1b7e267f81f946f68da28b1f2a /src/map/status.c
parentb397f7c6615f68f044100168eeaf157f6c60227c (diff)
downloadhercules-f3753f1cd474a84748b88991f74bcaa4f590f4ff.tar.gz
hercules-f3753f1cd474a84748b88991f74bcaa4f590f4ff.tar.bz2
hercules-f3753f1cd474a84748b88991f74bcaa4f590f4ff.tar.xz
hercules-f3753f1cd474a84748b88991f74bcaa4f590f4ff.zip
Replaced several 'int' variables with enums that they represent.
Expanded weapon_type enum with dual-wield constants (bugreport:384). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11704 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index e59bdc88a..137e65158 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7330,16 +7330,17 @@ int status_readdb(void)
i = 0;
while(fgets(line, sizeof(line), fp))
{
- char *split[MAX_WEAPON_TYPE + 5];
+ //NOTE: entry MAX_WEAPON_TYPE is not counted
+ char* split[5 + MAX_WEAPON_TYPE];
i++;
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<(MAX_WEAPON_TYPE + 5) && p;j++){ //not 22 anymore [blackhole89]
+ for(j=0,p=line; j < 5 + MAX_WEAPON_TYPE && p; j++){
split[j]=p;
p=strchr(p,',');
if(p) *p++=0;
}
- if(j < MAX_WEAPON_TYPE + 5)
+ if(j < 5 + MAX_WEAPON_TYPE)
{ //Weapon #.MAX_WEAPON_TYPE is constantly not load. Fix to that: replace < with <= [blackhole89]
ShowDebug("%s: Not enough columns at line %d\n", path, i);
continue;