diff --git a/crates/sel4-capdl-initializer/core/src/lib.rs b/crates/sel4-capdl-initializer/core/src/lib.rs index 6d862866b..dbd4ec27f 100644 --- a/crates/sel4-capdl-initializer/core/src/lib.rs +++ b/crates/sel4-capdl-initializer/core/src/lib.rs @@ -657,8 +657,8 @@ impl<'a, N: ObjectName, D: Content, M: GetEmbeddedFrame, B: BorrowMut<[PerObject Some(cap) => { let orig = self.orig_cap::(cap.object); let badge = cap.badge; - let rights = (&cap.rights).into(); - if badge == 0 || rights == CapRights::all() { + let rights = cap.rights.into(); + if badge == 0 && rights == CapRights::all() { orig } else { let src = init_thread::slot::CNODE.cap().relative(orig);