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 crash when installing vehicle parts on empty square #65472

Merged
merged 2 commits into from
May 5, 2023

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented May 4, 2023

Summary

Bugfixes "Fix crash when installing vehicle parts on empty square"

Purpose of change

Wow, cpart is not always a valid reference to determine a part location. So it's really not a good idea. (The additional crash seems to occur reliably after installing and then removing a part on an empty space, although on my very first try it crashed the moment I opened the install menu. In any case we need to not pass bad data)

Describe the solution

Let's use dd (rotated twice) like the entire rest of veh_interact does

Describe alternatives you've considered

Testing

Compiled it, mucked around with vehicles for a bit, couldn't reproduce crash and could always install vehicle parts when I should be able to.

Additional context

dd is my new best friend
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels May 4, 2023
@RenechCDDA RenechCDDA changed the title Fix crash when installing vehicles on empty square Fix crash when installing vehicle parts on empty square May 4, 2023
@RenechCDDA RenechCDDA marked this pull request as ready for review May 4, 2023 13:05
@dseguin dseguin merged commit 81c229f into CleverRaven:master May 5, 2023
@RenechCDDA RenechCDDA deleted the install_part_crash_hotfix branch May 5, 2023 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cant install frames on the car
2 participants