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

activity_actor: fix segfault in drop activities #45643

Merged
merged 1 commit into from
Nov 27, 2020
Merged

activity_actor: fix segfault in drop activities #45643

merged 1 commit into from
Nov 27, 2020

Conversation

andrei8l
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix segfault in drop activity"

Purpose of change

Minor oversight in obtain_activity_items can lead to a segfault.
Fixes: #45633

Describe the solution

restack pocket after manipulating charges

also restack pocket when changing favorite status from inventory menu

Describe alternatives you've considered

N/A

Testing

Start with a plastic bag. Insert 10x aspirin, then favorite the aspirins. Insert one more aspirin then favorite the aspirin (1). The aspirins should be stacked now.

To test for the segfault, revert the one-line change in game.cpp then drop the favorited aspirin (1) (which is not stacked in this case)

Additional context

N/A

restack pocket *after* manipulating charges

also restack pocket when changing favorite status from inventory menu

fixes #45633
@anothersimulacrum anothersimulacrum added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels Nov 26, 2020
@ZhilkinSerg ZhilkinSerg self-assigned this Nov 27, 2020
@ZhilkinSerg ZhilkinSerg merged commit de4b5e1 into CleverRaven:master Nov 27, 2020
@ZhilkinSerg ZhilkinSerg removed their assignment Nov 27, 2020
@andrei8l andrei8l deleted the fix-drop-segfault branch November 27, 2020 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault while dropping item when there are two favourited stack of it in the same pocket
3 participants