diff --git a/src/kernel/config.c b/src/kernel/config.c index d7ad98ecc..dcdb2046b 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -2143,7 +2143,7 @@ bool faction_id_is_unused(int id) int weight(const unit * u) { int w = 0, n = 0, in_bag = 0; - const resource_type *rtype = get_resourcetype(R_SACK_OF_CONSERVATION); + const resource_type *rtype = get_resourcetype(R_BAG_OF_HOLDING); item *itm; for (itm = u->items; itm; itm = itm->next) { diff --git a/src/kernel/unit.c b/src/kernel/unit.c index c965b6d9f..967ff5db5 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -798,7 +798,7 @@ void u_set_ship(unit * u, ship * sh) { assert(!u->ship); /* you must leave_ship */ u->ship = sh; - if (sh && !sh->_owner || sh->_owner->number <= 0) { + if (sh && (!sh->_owner || sh->_owner->number <= 0)) { ship_set_owner(u); } }