diff options
author | Haru <haru@dotalux.com> | 2014-10-31 15:14:01 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-10-31 15:17:15 +0100 |
commit | e9333d72a25187bf618922c1b0c1cc756d0a681b (patch) | |
tree | 8119e99b31ee72bf0eb8baf0488ebcde747af74b | |
parent | c451d3274787ee8d47938493e9e50801ae3e9540 (diff) | |
download | hercules-e9333d72a25187bf618922c1b0c1cc756d0a681b.tar.gz hercules-e9333d72a25187bf618922c1b0c1cc756d0a681b.tar.bz2 hercules-e9333d72a25187bf618922c1b0c1cc756d0a681b.tar.xz hercules-e9333d72a25187bf618922c1b0c1cc756d0a681b.zip |
Fixed some errors pointed out by clang's static analyzer
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/map/script.c | 3 | ||||
-rw-r--r-- | src/map/status.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index f4c343452..1516a0234 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8761,6 +8761,7 @@ BUILDIN(setmount) flag == SETMOUNT_TYPE_DRAGON_RED ? OPTION_DRAGON5 : OPTION_DRAGON1); // default value pc->setridingdragon(sd, option); + } } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_RANGER) { // Ranger (Warg) if (pc->checkskill(sd, RA_WUGRIDER)) @@ -8769,8 +8770,6 @@ BUILDIN(setmount) // Mechanic (Mado Gear) if (pc->checkskill(sd, NC_MADOLICENCE)) pc->setmadogear(sd, true); - } else if (flag != SETMOUNT_TYPE_PECO) - flag = SETMOUNT_TYPE_PECO; } else { // Knight / Crusader (Peco Peco) if (pc->checkskill(sd, KN_RIDING)) diff --git a/src/map/status.c b/src/map/status.c index 6c1be1029..36c9097e1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -11346,7 +11346,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) { if (sce && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x4000) && (!su || !su->group || !(skill->get_inf2(su->group->skill_id)&INF2_TRAP))) { // The hit is not counted if it's against a trap sce->val2 = 0; // This signals it to end. - } else if((bl->type&BL_SKILL) && sce->val4%2 == 0) { + } else if ((bl->type&BL_SKILL) && sce && sce->val4%2 == 0) { //Remove trap immunity temporarily so it triggers if you still stand on it sce->val4++; } |