Skip to content

Fix ByteListTag reading its own type and single-element lists - #280

Merged
PMK744 merged 2 commits into
SerenityJS:mainfrom
tutinoko2048:fix/byte-list-tag
Oct 17, 2026
Merged

PMK744 merged 2 commits into
SerenityJS:mainfrom
tutinoko2048:fix/byte-list-tag

Conversation

@tutinoko2048

Copy link
Copy Markdown
Contributor

Fixed

  • ByteListTag.read checked the tag type against TagType.Byte instead of TagType.ByteList, so reading a byte list with type: true always threw Expected tag type to be Byte, received ByteList.
  • new ByteListTag([5]) created an empty array of length 5 (the same as Array(5)) instead of [5], because super(...elements) treats a single number as a length. The elements are now pushed after super().

Copilot AI balanced review requested due to automatic review settings October 17, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@PMK744
PMK744 merged commit 5713454 into SerenityJS:main Oct 17, 2026
1 check passed
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.

3 participants