summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/skill.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ae6f03114..dc2fa78bf 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/09/12
+ * Fixed 'range' might be used uninitialized warning [Toms]
* Added Jaguar's sql script to convert all tables to MyISAM. It's located
in sql-files/convert_engine.sql WARNING: Using MyISAM is much faster than
InnoDB, but you are strongly recommended to backup your database before
diff --git a/src/map/skill.c b/src/map/skill.c
index 3fa78d6f9..52167dcfc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8982,7 +8982,7 @@ static int skill_sit_out (struct block_list *bl, va_list ap)
int skill_sit (struct map_session_data *sd, int type)
{
int flag = 0;
- int range, lv;
+ int range = 0, lv;
nullpo_retr(0, sd);
@@ -8994,7 +8994,7 @@ int skill_sit (struct map_session_data *sd, int type)
flag|=2;
range = skill_get_splash(TK_HPTIME, lv);
}
- else if ((lv= pc_checkskill(sd,TK_SPTIME)) > 0) {
+ else if ((lv = pc_checkskill(sd,TK_SPTIME)) > 0) {
flag|=2;
range = skill_get_splash(TK_SPTIME, lv);
}
@@ -9006,8 +9006,7 @@ int skill_sit (struct map_session_data *sd, int type)
map_foreachinrange(skill_sit_in,&sd->bl, range, BL_PC, flag);
return 0;
}
- else
- if(type==0) {
+ else if(type==0) {
if (map_foreachinrange(skill_sit_count,&sd->bl, range, BL_PC, flag) < 2)
map_foreachinrange(skill_sit_out,&sd->bl, range, BL_PC, flag);
return 0;