mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 01:11:22 +01:00
TypeInner::span: Tolerate bad array length constants for now.
This commit is contained in:
1 parent
f45d812266
commit
9c5f324de2
1 file changed
+2
-1
+2
-1
@@ -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