Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TargetAlignmentGreaterAndInputNotAligned panic when loading maps #157

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

white-axe
Copy link
Collaborator

Description
This pull request fixes a bug in web builds where loading maps sometimes results in a panic in bytemuck's from_bytes_mut function with the error TargetAlignmentGreaterAndInputNotAligned, by aligning the data of the tilemap shader properly.

Testing
The web build shouldn't randomly crash anymore when loading maps.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • Run cargo build --release
  • If applicable, run trunk build --release

@melody-rs
Copy link
Member

Oh, tysm! I was recently made aware of this bug and hadn't gotten around to fixing it

@melody-rs melody-rs merged commit fbe3f66 into Astrabit-ST:dev Dec 25, 2024
4 checks passed
@white-axe white-axe deleted the align branch December 25, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants