diff options
author | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
commit | 77f1f58c0a7eb55001b375f1945690ed5c1e87a2 (patch) | |
tree | 99e4b53b2966bd4d9bf545d18ddb7edb89472830 /src/WorldStorage/FastNBT.cpp | |
parent | Added LuaState support for all integral types (diff) | |
download | cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.gz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.bz2 cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.lz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.xz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.zst cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.zip |
Diffstat (limited to 'src/WorldStorage/FastNBT.cpp')
-rw-r--r-- | src/WorldStorage/FastNBT.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WorldStorage/FastNBT.cpp b/src/WorldStorage/FastNBT.cpp index 033a07601..f77197914 100644 --- a/src/WorldStorage/FastNBT.cpp +++ b/src/WorldStorage/FastNBT.cpp @@ -257,7 +257,7 @@ bool cParsedNBT::ReadTag(void) return true; } - default: + case TAG_Min: { ASSERT(!"Unhandled NBT tag type"); return false; @@ -503,7 +503,7 @@ void cFastNBTWriter::AddString(const AString & a_Name, const AString & a_Value) void cFastNBTWriter::AddByteArray(const AString & a_Name, const char * a_Value, size_t a_NumElements) { TagCommon(a_Name, TAG_ByteArray); - u_long len = htonl(static_cast<u_long>(a_NumElements)); + u_int len = htonl(static_cast<u_int>(a_NumElements)); m_Result.append(reinterpret_cast<const char *>(&len), 4); m_Result.append(a_Value, a_NumElements); } @@ -515,7 +515,7 @@ void cFastNBTWriter::AddByteArray(const AString & a_Name, const char * a_Value, void cFastNBTWriter::AddIntArray(const AString & a_Name, const int * a_Value, size_t a_NumElements) { TagCommon(a_Name, TAG_IntArray); - u_long len = htonl(static_cast<u_long>(a_NumElements)); + u_int len = htonl(static_cast<u_int>(a_NumElements)); size_t cap = m_Result.capacity(); size_t size = m_Result.length(); if ((cap - size) < (4 + a_NumElements * 4)) |