Skip to content

Safely enumerate loops #321

Description

@Zintixx

This is especially true on Update/ IUpdatable items. There could be changes done while in the midst of enumerating that would cause errors like:

Collection was modified; enumeration operation may not execute.

This was seen on FieldPlayer ln 114
foreach (BasicAttribute attribute in regenStats.Keys)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions