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

Fix code that indexes datum-typed variables #4159

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

out-of-phaze
Copy link
Member

Description of changes

Fixes datum[foo] which is going to be a runtime error in 516.

Why and what will this PR improve

Two of these were due to type-abused vars. One was an actual issue (circuits code) which would never work due to bad copypasta.

@out-of-phaze out-of-phaze added the ready for review This PR is ready for review and merge. label Jul 5, 2024
@MistakeNot4892 MistakeNot4892 added awaiting author This PR is awaiting action from the author before it can be merged. and removed ready for review This PR is ready for review and merge. labels Jul 10, 2024
@out-of-phaze out-of-phaze added ready for review This PR is ready for review and merge. and removed awaiting author This PR is awaiting action from the author before it can be merged. labels Jul 11, 2024
if (istype(new_data) && !isweakref(new_data))
new_data[i] = weakref(new_data[i])
if (istype(new_list[i], /datum) && !isweakref(new_list[i]))
new_data[i] = weakref(new_list[i])
Copy link
Contributor

Choose a reason for hiding this comment

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

Still appears to be failing on these ones - looks like new_list is mistyped?

@MistakeNot4892 MistakeNot4892 added awaiting author This PR is awaiting action from the author before it can be merged. and removed ready for review This PR is ready for review and merge. labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting author This PR is awaiting action from the author before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants