Graphics/TextSprite: Fix memory corruption
Former-commit-id: 2fc1fdcec29d58164b46ccd837bab56602418ce0
This commit is contained in:
parent
f60f8fa6a4
commit
a38d988507
|
|
@ -324,7 +324,7 @@ void NzTextSprite::OnAtlasLayerChange(const NzAbstractAtlas* atlas, NzAbstractIm
|
||||||
|
|
||||||
void NzTextSprite::UpdateData(InstanceData* instanceData) const
|
void NzTextSprite::UpdateData(InstanceData* instanceData) const
|
||||||
{
|
{
|
||||||
instanceData->data.resize(m_localVertices.size());
|
instanceData->data.resize(m_localVertices.size() * sizeof(NzVertexStruct_XYZ_Color_UV));
|
||||||
NzVertexStruct_XYZ_Color_UV* vertices = reinterpret_cast<NzVertexStruct_XYZ_Color_UV*>(instanceData->data.data());
|
NzVertexStruct_XYZ_Color_UV* vertices = reinterpret_cast<NzVertexStruct_XYZ_Color_UV*>(instanceData->data.data());
|
||||||
|
|
||||||
NzSparsePtr<NzColor> colorPtr(&vertices[0].color, sizeof(NzVertexStruct_XYZ_Color_UV));
|
NzSparsePtr<NzColor> colorPtr(&vertices[0].color, sizeof(NzVertexStruct_XYZ_Color_UV));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue