diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-12 18:39:57 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-12 18:39:57 +0000 |
commit | 59e595f4fb20c48b44f1e254a3f665d21ebcc945 (patch) | |
tree | 619e263d65d1be5cdbb58532f2c1b26037e36449 /src/map | |
parent | eb7df5bd7ec3557acbe42c17775ffb2cd2e69c36 (diff) | |
download | hercules-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
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; |