From 337e087182fca8bb5b62eb571309b0db19cb75c5 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 27 Oct 2017 21:08:17 -1000 Subject: [PATCH] 0-size buffer fix --- hecl/extern/athena | 2 +- hecl/include/hecl/Blender/BlenderConnection.hpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hecl/extern/athena b/hecl/extern/athena index 0fa861b70..57e5196e7 160000 --- a/hecl/extern/athena +++ b/hecl/extern/athena @@ -1 +1 @@ -Subproject commit 0fa861b708ac836323aadc673407a9a81e714ddb +Subproject commit 57e5196e726a4a53d55057130554cac812a40a61 diff --git a/hecl/include/hecl/Blender/BlenderConnection.hpp b/hecl/include/hecl/Blender/BlenderConnection.hpp index 85c3e2e23..6d41ba242 100644 --- a/hecl/include/hecl/Blender/BlenderConnection.hpp +++ b/hecl/include/hecl/Blender/BlenderConnection.hpp @@ -984,8 +984,11 @@ private: m_iboSz(iboData.size()*4), m_iboData(new uint8_t[iboData.size()*4]), m_surfaces(std::move(surfaces)), m_skinBanks(skinBanks) { - athena::io::MemoryWriter w(m_iboData.get(), m_iboSz); - w.enumerateLittle(iboData); + if (m_iboSz) + { + athena::io::MemoryWriter w(m_iboData.get(), m_iboSz); + w.enumerateLittle(iboData); + } } public: HMDLMeta m_meta;