summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-10-28 12:33:30 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-10-28 12:33:30 +0000
commit5b3532830e8c18baea99eccaa21a5c7569f8d02d (patch)
treefdbee1bf48e372a16ae833c8996aad27c3e808d0 /src/map/clif.c
parentfb33ba865eb09eef71ed38adbd141b6d771321b8 (diff)
downloadhercules-5b3532830e8c18baea99eccaa21a5c7569f8d02d.tar.gz
hercules-5b3532830e8c18baea99eccaa21a5c7569f8d02d.tar.bz2
hercules-5b3532830e8c18baea99eccaa21a5c7569f8d02d.tar.xz
hercules-5b3532830e8c18baea99eccaa21a5c7569f8d02d.zip
* Fixed db/packet_db.txt reading not checking for max. amount of positions.
* Introduced MAX_GUILD_SKILL_REQUIRE to fix inconsistency in amount of prereq. guild skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14985 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 738ca9485..01de1e51d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -15592,6 +15592,13 @@ static int packetdb_readdb(void)
if(p2) *p2++=0;
k = atoi(str2[j]);
// if (packet_db[packet_ver][cmd].pos[j] != k && clif_config.prefer_packet_db) // not used for now
+
+ if( j >= MAX_PACKET_POS )
+ {
+ ShowError("Too many positions found for packet 0x%04x (max=%d).\n", cmd, MAX_PACKET_POS);
+ break;
+ }
+
packet_db[packet_ver][cmd].pos[j] = k;
}
}