mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
TypeInner::span: Tolerate bad array length constants for now.
This commit is contained in:
committed by
Dzmitry Malyshau
parent
f45d812266
commit
9c5f324de2
@@ -94,7 +94,8 @@ impl super::TypeInner {
|
||||
} => {
|
||||
let count = match size {
|
||||
super::ArraySize::Constant(handle) => {
|
||||
constants[handle].to_array_length().unwrap()
|
||||
// Bad array lengths will be caught during validation.
|
||||
constants[handle].to_array_length().unwrap_or(1)
|
||||
}
|
||||
// A dynamically-sized array has to have at least one element
|
||||
super::ArraySize::Dynamic => 1,
|
||||
|
||||
Reference in New Issue
Block a user