Skip to content

Fix mutating global item_groups in get_filler_item_name()#10

Merged
Alchav merged 1 commit intoAlchav:pokemon-rb-version-6from
Mysteryem:patch-14
Feb 18, 2026
Merged

Fix mutating global item_groups in get_filler_item_name()#10
Alchav merged 1 commit intoAlchav:pokemon-rb-version-6from
Mysteryem:patch-14

Conversation

@Mysteryem
Copy link

The banned_items variable was the "Unique" list within the item_groups global. get_filler_item_name() could then mutate banned_items through banned_items.append("Poke Doll") and banned_items += item_groups["Vending Machine Drinks"], causing the contents of the item_groups global to be mutated.

This has been fixed by making banned_items a shallow copy of item_groups["Unique"].

The `banned_items` variable was the `"Unique"`list within the
`item_groups` global. `get_filler_item_name()` could then mutate
`banned_items` through `banned_items.append("Poke Doll")` and
`banned_items += item_groups["Vending Machine Drinks"]`, causing
the contents of the `item_groups` global to be mutated.

This has been fixed by making `banned_items` a shallow copy of
`item_groups["Unique"]`.
@Alchav Alchav merged commit 748c6f0 into Alchav:pokemon-rb-version-6 Feb 18, 2026
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.

2 participants