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

Copy the SimpleLiteral backing data instead of exposing it. #6683

Merged
merged 1 commit into from
May 10, 2024

Conversation

Moderocky
Copy link
Member

Description

Instead of directly exposing the so-called "constant" data array, SimpleLiteral now returns an array copy of it.
This stops a malformed syntax (e.g. an addon syntax) from just doing values[0] = ... and permanently changing the literal value for all future reads.


Target Minecraft Versions: any
Requirements: none
Related Issues: fixes #6682

@Moderocky Moderocky added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.8 Targeting a 2.8.X version release labels May 10, 2024
Copy link
Member

@UnderscoreTud UnderscoreTud left a comment

Choose a reason for hiding this comment

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

I am sad that kenzie didn't request a review from me :(

@Moderocky Moderocky merged commit d649c83 into SkriptLang:dev/patch May 10, 2024
5 checks passed
@Moderocky Moderocky deleted the fix-6682 branch May 10, 2024 16:06
sovdeeth pushed a commit to sovdeeth/Skript that referenced this pull request May 30, 2024
sovdeeth pushed a commit to sovdeeth/Skript that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants