fix: untyped retype: check null

This commit is contained in:
Paul Pan 2024-04-28 20:45:10 +08:00
parent 18240fec26
commit 5ea8a56611

View File

@ -89,7 +89,7 @@ impl UntypedCap<'_> {
slots slots
.iter() .iter()
.any(|cte| NullCap::try_from(cte).is_err()) .any(|cte| NullCap::try_from(cte).is_err())
.then_ok((), SysError::CapTypeMismatch)?; .else_ok((), SysError::CapTypeMismatch)?;
// Start allocating from free_offset // Start allocating from free_offset
// Notice: in vallina seL4, it will check whether there are child nodes, // Notice: in vallina seL4, it will check whether there are child nodes,