diff options
author | xazax-hun <xazax-hun@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-23 12:20:51 +0000 |
---|---|---|
committer | xazax-hun <xazax-hun@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-23 12:20:51 +0000 |
commit | 0d06b767e34eff1f6782aae8acb55b7040c9f5ce (patch) | |
tree | d6f9d632e858cf12f2ae625b800b915d504347e8 /src | |
parent | 3a783a8bdd6f2c3e59ce900ef36af7e8e79a2f5b (diff) | |
download | hercules-0d06b767e34eff1f6782aae8acb55b7040c9f5ce.tar.gz hercules-0d06b767e34eff1f6782aae8acb55b7040c9f5ce.tar.bz2 hercules-0d06b767e34eff1f6782aae8acb55b7040c9f5ce.tar.xz hercules-0d06b767e34eff1f6782aae8acb55b7040c9f5ce.zip |
* Reading the itemDB checks for extra columns.
* Fixed a typo in mobDB reading followup r15531. (bugreport:5482)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15784 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/itemdb.c | 6 | ||||
-rw-r--r-- | src/map/mob.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 3523ea7ef..73ab0de91 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -959,6 +959,12 @@ static int itemdb_readdb(void) } str[21] = p; + p = strstr(p+1,"}"); + if ( strchr(p,',') != NULL ) + { + ShowError("itemdb_readdb: Extra columns in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0])); + continue; + } if (!itemdb_parse_dbrow(str, path, lines, 0)) continue; diff --git a/src/map/mob.c b/src/map/mob.c index 27d696f88..3f6cb6cb7 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3753,7 +3753,7 @@ static void mob_readdb(void) } } - sv_readdb(db_path, filename[fi], ',', 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, 38+2*MAX_MVP_DROP+2*MAX_MOB_DROP, -1, &mob_readdb_sub); + sv_readdb(db_path, filename[fi], ',', 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, 31+2*MAX_MVP_DROP+2*MAX_MOB_DROP, -1, &mob_readdb_sub); } } |