From 3b7d44aa0b84f9c208d906f4d10517e36220ee80 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sat, 5 Sep 2015 13:17:56 +0200 Subject: Create constant for maximum list and array length --- include/io/stream_writer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/io/stream_writer.h b/include/io/stream_writer.h index c771426bb3..959202e1ad 100644 --- a/include/io/stream_writer.h +++ b/include/io/stream_writer.h @@ -54,8 +54,10 @@ void write_tag(const std::string& key, const tag& t, std::ostream& os, endian::e class stream_writer { public: - ///Maximum length of an NBT string (65535) + ///Maximum length of an NBT string (16 bit unsigned) static constexpr size_t max_string_len = UINT16_MAX; + ///Maximum length of an NBT list or array (32 bit signed) + static constexpr uint32_t max_array_len = INT32_MAX; /** * @param os the stream to write to -- cgit 0.0.5-2-1-g0f52