Use correct calculation for dStrncat

This commit is contained in:
Johan Mattsson 2023-03-05 11:28:23 +01:00 committed by GitHub
parent 2e1cfe9332
commit 77e808cc3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -280,7 +280,7 @@ void GFXD3D11Device::enumerateAdapters(Vector<GFXAdapter*> &adapterList)
SAFE_DELETE_ARRAY(str);
dStrncpy(toAdd->mName, Description.c_str(), GFXAdapter::MaxAdapterNameLen);
dStrncat(toAdd->mName, " (D3D11)", 8);
dStrncat(toAdd->mName, " (D3D11)", sizeof(toAdd->mName) - strlen(toAdd->mName) - 1);
IDXGIOutput* pOutput = NULL;
HRESULT hr;