mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
virtio: kumquat: slice length fix
Causes issues with some versions of host gfxstream. Reviewed-by: David Gilhooley <djgilhooley.gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
This commit is contained in:
parent
f367cdad0a
commit
b8f0933b25
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ impl VirtGpuKumquat {
|
|||
pub fn get_caps(&self, capset_id: u32, slice: &mut [u8]) -> MesaResult<()> {
|
||||
let caps = self.capsets.get(&capset_id).ok_or(MesaError::Unsupported)?;
|
||||
let length = min(slice.len(), caps.len());
|
||||
slice.copy_from_slice(&caps[0..length]);
|
||||
slice[0..length].copy_from_slice(&caps[0..length]);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue