lib/nbt: Lists and compounds can be constructed with vectors of invalid data #60

Closed
opened 2022-10-09 16:00:55 +02:00 by BodgeMaster · 2 comments

¯\_(°_°)_/¯

Can probably be fixed by checking the type on all contained elements and setting the contained type to invalid when multiple types are found.

This will probably require the affected constructors to be made private and replaced with static ErrorOr<List> and ErrorOr<Compound> functions.

¯\\\_(°\_°)\_/¯ ~~Can probably be fixed by checking the type on all contained elements and setting the contained type to invalid when multiple types are found.~~ This will probably require the affected constructors to be made private and replaced with static `ErrorOr<List>` and `ErrorOr<Compound>` functions.
BodgeMaster added this to the NBT milestone 2022-10-09 16:00:55 +02:00
BodgeMaster added the
TODO
Bug
labels 2022-10-09 16:00:55 +02:00
BodgeMaster changed title from lib/nbt: List can be constructed with a vector of mixed tags to lib/nbt: Lists and compounds can be constructed with vectors of invalid data 2022-10-14 17:14:19 +02:00

List done. An additional unit test for trying to construct a list from mixed tags is needed.

List done. An additional unit test for trying to construct a list from mixed tags is needed.

Compound done.

Unit tests still needed.

Compound done. Unit tests still needed.
Sign in to join this conversation.
There is no content yet.