fix blendmap loading issue where the map had a full 256 source color set

This commit is contained in:
Gered 2022-07-20 17:36:08 -04:00
parent c4e0a11259
commit 0c9418aaa5

View file

@ -253,7 +253,7 @@ impl BlendMap {
let start_color = reader.read_u8()?;
let end_color = reader.read_u8()?;
let num_maps = (end_color - start_color + 1) as usize;
let num_maps = (end_color as usize - start_color as usize + 1);
let mut maps = Vec::with_capacity(num_maps);
for _ in 0..num_maps {