From d09ffb861ed134fcc7dc80f4051302296151e745 Mon Sep 17 00:00:00 2001 From: "kts of kettek(MindFire)" Date: Wed, 15 Jan 2020 15:09:06 -0800 Subject: [PATCH] Fix missing blocks --- common/living.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/common/living.c b/common/living.c index 3917060..5273008 100644 --- a/common/living.c +++ b/common/living.c @@ -1183,12 +1183,13 @@ void fix_object(object *op) { wc-=(tmp->stats.wc+tmp->magic); if (tmp->slaying!=NULL) { - if (op->slaying != NULL) + if (op->slaying != NULL) { sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); free_string(op->slaying); op->slaying = joined_str; - else + } else { add_refcount(op->slaying = tmp->slaying); + } } if (tmp->stats.ac) @@ -1237,12 +1238,13 @@ void fix_object(object *op) { if (weapon_speed<0) weapon_speed=0; if (tmp->slaying!=NULL) { - if (op->slaying != NULL) + if (op->slaying != NULL) { sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); free_string(op->slaying); op->slaying = joined_str; - else + } else { add_refcount(op->slaying = tmp->slaying); + } } /* If there is desire that two handed weapons should do * extra strength damage, this is where the code should @@ -1282,12 +1284,13 @@ void fix_object(object *op) { if (ARMOUR_SPEED(tmp) && ARMOUR_SPEED(tmp)/10.0slaying!=NULL) { - if (op->slaying != NULL) + if (op->slaying != NULL) { sstring joined_str = join_strings(op->slaying, tmp->slaying, ","); free_string(op->slaying); op->slaying = joined_str; - else + } else { add_refcount(op->slaying = tmp->slaying); + } } break; } /* switch tmp->type */