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

inv_ui: check only allowed parents in indent sort #56867

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

andrei8l
Copy link
Contributor

@andrei8l andrei8l commented Apr 17, 2022

Summary

None

Purpose of change

Indented sorting in inventory UIs can lead to crashes if the checked parents are of an unexpected type
Fixes: #56827
Fixes: #56887

Describe the solution

Only consider parents allowed by the preset

Describe alternatives you've considered

Disabling indented sorting for the problematic preset: this only sweeps the issue under the rug
Adding a safety check to the problematic preset: this should NOT be necessary

Testing

Wear 2 backpacks and insert one 7-round shotgun in each, then activate a bottom mount. There should be no crash.

All indented inventory UIs should look the same

Additional context

I introduced this bug in #53373

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 17, 2022
@dseguin dseguin added Info / User Interface Game - player communication, menus, etc. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones labels Apr 18, 2022
@dseguin dseguin merged commit 92c21ca into CleverRaven:master Apr 18, 2022
@andrei8l andrei8l deleted the inv_ui-this-is-not-a-gun branch April 18, 2022 19:06
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 [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault when attempting to use side mount SEGFAULT when applying a bottom mount to favorited firearms
2 participants