diff --git a/embassy-nrf/src/util.rs b/embassy-nrf/src/util.rs index 42265dc2..cd0f5949 100644 --- a/embassy-nrf/src/util.rs +++ b/embassy-nrf/src/util.rs @@ -23,7 +23,7 @@ pub(crate) fn slice_in_ram(slice: *const [T]) -> bool { #[cfg(not(feature = "nrf51"))] pub(crate) fn slice_in_ram_or(slice: *const [T], err: E) -> Result<(), E> { let (_, len) = slice_ptr_parts(slice); - if len > 0 && slice_in_ram(slice) { + if len == 0 || slice_in_ram(slice) { Ok(()) } else { Err(err)