lib/nbt: Make list serielizer return an error when serializing a list with no contained type set
parent
b1ba33b39f
commit
f0092b78d3
|
@ -868,6 +868,9 @@ namespace NBT {
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOrVoid List::serializeWithoutHeader(std::vector<uint8_t>* rawData) {
|
ErrorOrVoid List::serializeWithoutHeader(std::vector<uint8_t>* rawData) {
|
||||||
|
if (this->containedType == TagType::INVALID) {
|
||||||
|
return ErrorOrVoid(true, ErrorCodes::INVALID_TYPE);
|
||||||
|
}
|
||||||
rawData->push_back(this->containedType);
|
rawData->push_back(this->containedType);
|
||||||
|
|
||||||
// 32 bit signed integer max
|
// 32 bit signed integer max
|
||||||
|
|
Loading…
Reference in New Issue