summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 18:39:57 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 18:39:57 +0000
commit59e595f4fb20c48b44f1e254a3f665d21ebcc945 (patch)
tree619e263d65d1be5cdbb58532f2c1b26037e36449
parenteb7df5bd7ec3557acbe42c17775ffb2cd2e69c36 (diff)
downloadhercules-59e595f4fb20c48b44f1e254a3f665d21ebcc945.tar.gz
hercules-59e595f4fb20c48b44f1e254a3f665d21ebcc945.tar.bz2
hercules-59e595f4fb20c48b44f1e254a3f665d21ebcc945.tar.xz
hercules-59e595f4fb20c48b44f1e254a3f665d21ebcc945.zip
Fixed 'range' might be used uninitialized warning
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8723 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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;