diff --git a/deps/ox/src/ox/mc/write.hpp b/deps/ox/src/ox/mc/write.hpp index dfa70a2a..abcb4c7f 100644 --- a/deps/ox/src/ox/mc/write.hpp +++ b/deps/ox/src/ox/mc/write.hpp @@ -211,11 +211,14 @@ constexpr Error MetalClawWriter::field(const char *name, const IString -constexpr Error MetalClawWriter::fieldCString(const char*, const char *const*val, std::size_t buffLen) noexcept { +constexpr Error MetalClawWriter::fieldCString(const char*, const char *const*val, std::size_t) noexcept { bool fieldSet = false; if (!m_unionIdx.has_value() || *m_unionIdx == m_field) { OX_ALLOW_UNSAFE_BUFFERS_BEGIN - const auto strLen = *val ? ox::strnlen_s(*val, buffLen) : 0; + // this strlen is tolerated because sometimes 0 gets passed to + // the size param, which is a lie + // this code should be cleaned up at some point... + const auto strLen = *val ? ox::strlen(*val) : 0; OX_ALLOW_UNSAFE_BUFFERS_END // write the length const auto strLenBuff = mc::encodeInteger(strLen);