瀏覽代碼

Fixed warning:'type' might be used uninitialized in this function

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8123 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms 19 年之前
父節點
當前提交
8c8609bece
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/battle.c

+ 2 - 0
Changelog-Trunk.txt

@@ -2,6 +2,8 @@ Date	Added
 
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/08/04
+	* Fixed warning:'type' might be used uninitialized in this function [Toms]
 2006/08/03
 	* Added a check to skip the experience share of characters who are dead or
 	  on another map. [Skotlex]

+ 1 - 1
src/map/battle.c

@@ -656,7 +656,7 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
 static int battle_calc_base_damage(struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag)
 {
 	unsigned short atkmin=0, atkmax=0;
-	short type;
+	short type = 0;
 	int damage = 0;
 
 	if (!sd)