[host] dxgi: fix d3d11 invalid memory allocation for backend struct

This commit is contained in:
Geoffrey McRae 2023-11-07 21:25:29 +11:00
parent fd79bb1333
commit 772e0e3b4a

View file

@ -50,7 +50,7 @@ static bool d3d11_create(unsigned textures)
DEBUG_ASSERT(!this);
this = calloc(1,
sizeof(struct D3D11Backend) +
sizeof(*this->texture) + textures);
sizeof(*this->texture) * textures);
if (!this)
{