From e9333d72a25187bf618922c1b0c1cc756d0a681b Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 31 Oct 2014 15:14:01 +0100 Subject: Fixed some errors pointed out by clang's static analyzer Signed-off-by: Haru --- src/map/script.c | 3 +-- src/map/status.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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++; } -- cgit v1.2.3-70-g09d2