test/nbt_read_write_helpers: Change unnecessarily long string to be just one above the allowed size
parent
10b1d9fa0c
commit
47fd1f8970
|
@ -574,7 +574,7 @@ int main(){
|
||||||
ASSERT(javaStdString1 == *exportedString);
|
ASSERT(javaStdString1 == *exportedString);
|
||||||
|
|
||||||
//check that we get an error when trying to write a string that is too long
|
//check that we get an error when trying to write a string that is too long
|
||||||
std::string overrunString = std::string(0xFFFFF, '.');
|
std::string overrunString = std::string(0x10000, '.');
|
||||||
ASSERT(NBT::Helper::writeString(exportedString, tiny_utf8::string(overrunString)).isError);
|
ASSERT(NBT::Helper::writeString(exportedString, tiny_utf8::string(overrunString)).isError);
|
||||||
ASSERT(NBT::Helper::writeString(exportedString, tiny_utf8::string(overrunString)).errorCode == ErrorCodes::OVERRUN);
|
ASSERT(NBT::Helper::writeString(exportedString, tiny_utf8::string(overrunString)).errorCode == ErrorCodes::OVERRUN);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue