From a38d988507cec49b0bd182a92d24576fd5c37749 Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 12 Jun 2015 00:18:35 +0200 Subject: [PATCH] Graphics/TextSprite: Fix memory corruption Former-commit-id: 2fc1fdcec29d58164b46ccd837bab56602418ce0 --- src/Nazara/Graphics/TextSprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nazara/Graphics/TextSprite.cpp b/src/Nazara/Graphics/TextSprite.cpp index b4128d7ed..5a8f7d57c 100644 --- a/src/Nazara/Graphics/TextSprite.cpp +++ b/src/Nazara/Graphics/TextSprite.cpp @@ -324,7 +324,7 @@ void NzTextSprite::OnAtlasLayerChange(const NzAbstractAtlas* atlas, NzAbstractIm 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(instanceData->data.data()); NzSparsePtr colorPtr(&vertices[0].color, sizeof(NzVertexStruct_XYZ_Color_UV));