diff --git a/deps/ox/src/ox/oc/write.hpp b/deps/ox/src/ox/oc/write.hpp index 1073238b..79713591 100644 --- a/deps/ox/src/ox/oc/write.hpp +++ b/deps/ox/src/ox/oc/write.hpp @@ -89,7 +89,7 @@ class OrganicClawWriter { template Error OrganicClawWriter::field(const char *key, T *val, std::size_t len) noexcept { - if (targetValid()) { + if (targetValid() && len) { OrganicClawWriter w((Json::Value(Json::arrayValue))); for (std::size_t i = 0; i < len; ++i) { oxReturnError(w.field("", &val[i]));