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

Crash when trying to load Hellfire nlevels/towndata/town.cel #54

Closed
AJenbo opened this issue Dec 22, 2022 · 3 comments · Fixed by #64
Closed

Crash when trying to load Hellfire nlevels/towndata/town.cel #54

AJenbo opened this issue Dec 22, 2022 · 3 comments · Fixed by #64
Assignees
Labels
bug Something isn't working

Comments

@AJenbo
Copy link
Member

AJenbo commented Dec 22, 2022

Issue was introduced in a515972

With out investigating I'm thinking this is caused by Hellfire not updating the town metadata but extending the number of tiles so there is some soft of mismatch that we should be tolerant of.

image

@AJenbo AJenbo added the bug Something isn't working label Dec 22, 2022
@AJenbo
Copy link
Member Author

AJenbo commented Dec 23, 2022

Looks like the error is in reading data past the end of the buffer:
https://github.com/savagesteel/d1-graphics-tool/blob/master/source/d1celtilesetframe.cpp#L48

If guarding against that we can open the file, but the last 3 subtiles are missing:
image

@AJenbo
Copy link
Member Author

AJenbo commented Dec 23, 2022

Frames past 3794 are decoded using the wrong type:
image

@AJenbo
Copy link
Member Author

AJenbo commented Dec 23, 2022

The issue turned out to be Hellfire's town.sol only having 1376 tiles instead of 1379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant