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); } }