1
0
mirror of https://github.com/solemnwarning/directplay-lite synced 2024-12-30 16:45:37 +01:00

Ensure provider component is always first.

This commit is contained in:
Daniel Collins 2018-08-29 00:29:08 +01:00
parent d2092b8641
commit 9659e2e84b

View File

@ -300,7 +300,14 @@ HRESULT DirectPlay8Address::AddComponent(CONST WCHAR* CONST pwszName, CONST void
*existing_component = new_component;
}
else{
components.push_back(new_component);
if(wcscmp(pwszName, DPNA_KEY_PROVIDER) == 0)
{
/* Provider is always the first component. */
components.insert(components.begin(), new_component);
}
else{
components.push_back(new_component);
}
}
return S_OK;