lib/nbt: NBT validator: Fix wrong function declaration in the header, fix not using the currentPosition variable when accessing data
parent
884a5239c6
commit
589cf1ddaf
|
@ -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:
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue