summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorblackhole89 <blackhole89@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 20:26:45 +0000
committerblackhole89 <blackhole89@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 20:26:45 +0000
commitb45baa6bfcd406e8344e4337c6f9c44e55287ccb (patch)
tree40bdfb18ec1af6b708f27d5d435c9d5dbf83f5e3 /src/map/status.c
parentb84f8eb92e9a6d93e34dc4a6b8127f92998b36f1 (diff)
downloadhercules-b45baa6bfcd406e8344e4337c6f9c44e55287ccb.tar.gz
hercules-b45baa6bfcd406e8344e4337c6f9c44e55287ccb.tar.bz2
hercules-b45baa6bfcd406e8344e4337c6f9c44e55287ccb.tar.xz
hercules-b45baa6bfcd406e8344e4337c6f9c44e55287ccb.zip
only the first 22 CSVs were read in, but MAX_WEAPON_TYPE+5 was 27 -> uninitialized array indices got atoi'd
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5539 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 1142f6810..c6152530a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5740,12 +5740,12 @@ int status_readdb(void) {
char *split[MAX_WEAPON_TYPE + 5];
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j<22 && p;j++){
+ for(j=0,p=line;j<(MAX_WEAPON_TYPE + 5) && p;j++){ //not 22 anymore [blackhole89]
split[j]=p;
p=strchr(p,',');
if(p) *p++=0;
}
- if(j<22)
+ if(j<(MAX_WEAPON_TYPE + 5))
continue;
if(atoi(split[0])>=MAX_PC_CLASS)
continue;