Lommix / bevy_aseprite_ultra

The ultimate bevy aseprite binary plugin. Featuring animations and static atlas loading with pivots. Full support for hot reloading!
MIT License
35 stars 10 forks source link

Some palette cannot been loaded #2

Closed darkautism closed 4 months ago

darkautism commented 6 months ago

thread 'IO Task Pool (0)' panicked at C:\Users\kautism.cargo\registry\src\index.crates.io-6f17d22bba15001f\aseprite-loader-0.2.0\src\binary\chunks\palette.rs:52:42: attempt to add with overflow

bikeshedder commented 4 months ago

This is not a bug of bevy_aseprite_ultra but aseprite-loader.

Looking at the palette code I think I know what's causing this. Range<u8> can only represent palettes with up to 255 colors. When changing it to RangeInclusive<u8> it can store the range 0..=255 which does not trigger that overflow.

Can you please open an issue in the aseprite-loader repository and provide an example aseprite file that triggers this bug?

bikeshedder commented 4 months ago

I just released aseprite-loader 0.3.0 including this fix. Now bevy_aseprite_loader just needs to be updated.

I couldn't make this a non-breaking release as it is a change of a public API of aseprite-loader even if it doesn't break bevy_asprite_ultra.

Edit: I take that back. It does break bevy_aseprite_ultra.

bikeshedder commented 4 months ago

@darkautism I just opened PR #6 which should fix this issue.