From 443a62c3f42ee0601e7615033d015051d194ceb0 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 3 Nov 2017 17:52:35 -0500 Subject: [PATCH] Fix ArrayLength type case in Metal Claw writer --- src/ox/mc/write.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ox/mc/write.hpp b/src/ox/mc/write.hpp index 8380b3c71..ccaabd154 100644 --- a/src/ox/mc/write.hpp +++ b/src/ox/mc/write.hpp @@ -120,7 +120,7 @@ int MetalClawWriter::op(const char*, T *val, size_t len) { // write the length typedef uint32_t ArrayLength; if (m_buffIt + sizeof(ArrayLength) < m_buffLen) { - *((T*) &m_buff[m_buffIt]) = ox::bigEndianAdapt((ArrayLength) len); + *((ArrayLength*) &m_buff[m_buffIt]) = ox::bigEndianAdapt((ArrayLength) len); m_buffIt += sizeof(ArrayLength); } else { err = MC_BUFFENDED;