From 5b3532830e8c18baea99eccaa21a5c7569f8d02d Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 28 Oct 2011 12:33:30 +0000 Subject: * 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 --- src/map/clif.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map/clif.c') 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; } } -- cgit v1.2.3-70-g09d2