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

do not edit the zone currently iterated on #4345

Merged
merged 1 commit into from
May 10, 2021

Conversation

ebbit1q
Copy link
Member

@ebbit1q ebbit1q commented May 10, 2021

Related Ticket(s)

Short roundup of the initial problem

unattaching cards invokes the moveCard function which changes the
internal cards list

this can cause the iterator to become invalidated which will crash but
because of the data not always being moved it will often still work as
intended, giving the idea that it is random

What will change with this Pull Request?

  • cards will no longer be unattached when a player leaves play if both cards are controlled by the same player
    • this is unnoticeable to clients as in the same event that player will have all their cards deleted regardless

this can cause the iterator to become invalidated which will crash but
because of the data not always being moved it will often still work as
intended, giving the idea that it is random
Copy link
Member

@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense

@ZeldaZach ZeldaZach merged commit ae74377 into Cockatrice:master May 10, 2021
@ebbit1q ebbit1q deleted the fixcrashonconcede branch May 10, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants