From 06d3ecaabad6e81d0c6478d59632d0b4d4673423 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 8 Dec 2006 14:43:47 +0000 Subject: - Fixed crash when looters became full. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9437 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/mob.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 9d5b80263..3f4277adb 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/12/08 + * Fixed crash when looters became full. [Skotlex] * Autospell delay time is now the skill's full delay. [Skotlex] 2006/12/07 * Fixed ladmin's linux compilation and moved some platform specific diff --git a/src/map/mob.c b/src/map/mob.c index 2911572cb..d357c1199 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1253,7 +1253,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) } else { //Destroy first looted item... if (md->lootitem[0].card[0] == CARD0_PET) intif_delete_petdata( MakeDWord(md->lootitem[0].card[1],md->lootitem[0].card[2]) ); - memmove(&md->lootitem[0], &md->lootitem[1], sizeof(md->lootitem) - sizeof(md->lootitem[0])); + memmove(&md->lootitem[0], &md->lootitem[1], (LOOTITEM_SIZE-1)*sizeof(md->lootitem[0])); memcpy (&md->lootitem[LOOTITEM_SIZE-1], &fitem->item_data, sizeof(md->lootitem[0])); } if (pcdb_checkid(md->vd->class_)) -- cgit v1.2.3-70-g09d2