Skip to content

Swapped Identity Assignment in APICreateSocketPair#404

Open
thouravi wants to merge 1 commit intoValveSoftware:masterfrom
thouravi:patch-1
Open

Swapped Identity Assignment in APICreateSocketPair#404
thouravi wants to merge 1 commit intoValveSoftware:masterfrom
thouravi:patch-1

Conversation

@thouravi
Copy link
Copy Markdown
Contributor

pConn[0] is initialized with pIdentity[1] and scopeLock[1]
pConn[1] is initialized with pIdentity[0] and scopeLock[0]

The indices are inverted. Each connection slot gets the wrong identity and the wrong scope lock.

Fix:

pConn[0] = new CSteamNetworkConnectionlocalhostLoopback( pSteamNetworkingSocketsInterface, pIdentity[0], scopeLock[0] );
pConn[1] = new CSteamNetworkConnectionlocalhostLoopback( pSteamNetworkingSocketsInterface, pIdentity[1], scopeLock[1] );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant