diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index a765d2d41..f6b3f3302 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -1369,7 +1369,7 @@ void FMultiPatchTexture::ResolvePatches() { if (Parts[i].Texture == nullptr) { - memcpy(&Parts[i], &Parts[i + 1], NumParts - i - 1); + memcpy(&Parts[i], &Parts[i + 1], (NumParts - i - 1) * sizeof(TexPart)); i--; NumParts--; }