0-size buffer fix

This commit is contained in:
Jack Andersen 2017-10-27 21:08:17 -10:00
parent a2c5d891b5
commit 337e087182
2 changed files with 6 additions and 3 deletions

2
hecl/extern/athena vendored

@ -1 +1 @@
Subproject commit 0fa861b708ac836323aadc673407a9a81e714ddb Subproject commit 57e5196e726a4a53d55057130554cac812a40a61

View File

@ -983,10 +983,13 @@ private:
m_vboSz(vboSz), m_vboData(new uint8_t[vboSz]), m_vboSz(vboSz), m_vboData(new uint8_t[vboSz]),
m_iboSz(iboData.size()*4), m_iboData(new uint8_t[iboData.size()*4]), m_iboSz(iboData.size()*4), m_iboData(new uint8_t[iboData.size()*4]),
m_surfaces(std::move(surfaces)), m_skinBanks(skinBanks) m_surfaces(std::move(surfaces)), m_skinBanks(skinBanks)
{
if (m_iboSz)
{ {
athena::io::MemoryWriter w(m_iboData.get(), m_iboSz); athena::io::MemoryWriter w(m_iboData.get(), m_iboSz);
w.enumerateLittle(iboData); w.enumerateLittle(iboData);
} }
}
public: public:
HMDLMeta m_meta; HMDLMeta m_meta;
size_t m_vboSz; size_t m_vboSz;