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

Account for empty variant arrays in parser #12

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

Conversation

Grimeh
Copy link

@Grimeh Grimeh commented Jun 12, 2024

It's possible for entries in .shadervariants assets to have an empty variants array. Eg. variants: [].

This causes the parser to go out-of-bounds in the yaml list when the final entry has an empty variants array. When not the final entry, it probably causes the next entry to be parsed incorrectly.

Example of empty variant array:

  - first: {fileID: 4800000, guid: a5e0f9ecc5bd641c0b9a6c17fa79ded3, type: 3}
    second:
      variants: []

It's possible for entries in `.shadervariants` assets to have an empty variants array. Eg. `variants: []`.

This causes the parser to go out-of-bounds in the `yaml` list when the final entry has an empty variants array.
When not the final entry, it probably causes the next entry to be parsed incorrectly.
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.

1 participant