summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 22:10:13 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 22:10:13 +0000
commit18b0f1eef71423ed6350ef9ed5c2d7e8563ddf0f (patch)
tree2593df267757740a2b1fe20d7eadc1c7c23850fc
parent2ea484313f08eb2041274a7f5f37a3ed03fbd646 (diff)
downloadhercules-18b0f1eef71423ed6350ef9ed5c2d7e8563ddf0f.tar.gz
hercules-18b0f1eef71423ed6350ef9ed5c2d7e8563ddf0f.tar.bz2
hercules-18b0f1eef71423ed6350ef9ed5c2d7e8563ddf0f.tar.xz
hercules-18b0f1eef71423ed6350ef9ed5c2d7e8563ddf0f.zip
bounds updates
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@797 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/clif.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 3138a5934..a90221c0f 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,6 @@
Date Added
12/26
- * Fixed some array bounds errors (SVN 796) [MouseJstr]
+ * Fixed some array bounds errors (SVN 797) [MouseJstr]
* @mapexit (and do_final) now persist all data to the
char server before exiting to eliminate storage/inventory
inconsistancies.. [MouseJstr] (SVN 793)
diff --git a/src/map/battle.c b/src/map/battle.c
index 92711bcd4..f7ca80a93 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3026,8 +3026,10 @@ static struct Damage battle_calc_pc_weapon_attack(
damage += atkmax;
damage2 += atkmax_;
if(sd->atk_rate != 100 || sd->weapon_atk_rate != 0) {
+ if (sd->status.weapon < 16) {
damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ }
}
if(sd->state.arrow_atk)
damage += sd->arrow_atk;
diff --git a/src/map/clif.c b/src/map/clif.c
index 14e4db377..ca7e60c6c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5105,7 +5105,7 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const ch
if(range < 0)
range = battle_get_range(&sd->bl) - (range + 1);
WFIFOW(fd,12)=range;
- memcpy(WFIFOP(fd,14),name,24);
+ strncpy(WFIFOP(fd,14),name,24);
WFIFOB(fd,38)=0;
WFIFOSET(fd,packet_len_table[0x147]);
return 0;