summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-06 11:55:55 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-06 11:55:55 +0000
commit39d776311e6cda0692503f599ce997a77dbe700d (patch)
tree23a1f8e7a5687ddb87d397ddef68ad041bbc3831 /src/map/clif.c
parentb1a8b920af2b39f546cd3408af893741fc94e12b (diff)
downloadhercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.gz
hercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.bz2
hercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.xz
hercules-39d776311e6cda0692503f599ce997a77dbe700d.zip
* Fixed a crash in clif_send when checking packet version
* Fixed a crash in Deluge, Volcano and Violent Gale * Allow super novices to rent carts from the Kafra git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1420 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index d3536b1c6..50031a44f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -442,6 +442,8 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) {
if ((sd = g->member[i].sd) != NULL) {
if (type == GUILD_WOS && sd->bl.id == bl->id)
continue;
+ if (sd->packet_ver > MAX_PACKET_VER)
+ continue;
if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);