mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Declare which index levels a node reads and nullify the rest
This commit is contained in:
@@ -59,7 +59,7 @@ fn image_color_palette(
|
||||
})
|
||||
.collect();
|
||||
|
||||
palette.get(ctx.innermost_index() as usize).copied().ok_or_else(|| GraphError::past_end().into())
|
||||
palette.get(ctx.index() as usize).copied().ok_or_else(|| GraphError::past_end().into())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -107,7 +107,7 @@ pub fn combine_channels<'e>(
|
||||
)>,
|
||||
Interrupt,
|
||||
> {
|
||||
let lane = ctx.innermost_index() as usize;
|
||||
let lane = ctx.index() as usize;
|
||||
let max_len = red.len().max(green.len()).max(blue.len()).max(alpha.len());
|
||||
if lane >= max_len {
|
||||
return Err(GraphError::past_end().into());
|
||||
|
||||
Reference in New Issue
Block a user