lib/nbt: NBT validator: Fix wrong function declaration in the header, fix not using the currentPosition variable when accessing data

Soda
BodgeMaster 2022-08-15 09:53:06 +02:00
parent 884a5239c6
commit 589cf1ddaf
2 changed files with 2 additions and 2 deletions

View File

@ -777,7 +777,7 @@ namespace NBT {
return false; return false;
} }
switch (data[0]) { switch (data[currentPosition]) {
case TagType::INT8: case TagType::INT8:
case TagType::INT16: case TagType::INT16:
case TagType::INT32: case TagType::INT32:

View File

@ -113,5 +113,5 @@ namespace NBT {
bool validate(uint8_t data[]); bool validate(uint8_t data[]);
}; };
bool validateRawNBTData(uint8_t data[], uint64_t dataSize, uint64_t initialPosition, uint64_t* processedDataSize=nullptr); bool validateRawNBTData(uint8_t data[], uint64_t dataSize, uint64_t initialPosition=0, uint64_t* processedDataSize=nullptr);
} }