Skip to content

lsteamclient: Fix count in wow64 networking messages conversion.#9665

Open
viper9503 wants to merge 1 commit intoValveSoftware:proton_10.0from
viper9503:proton_10.0
Open

lsteamclient: Fix count in wow64 networking messages conversion.#9665
viper9503 wants to merge 1 commit intoValveSoftware:proton_10.0from
viper9503:proton_10.0

Conversation

@viper9503
Copy link
Copy Markdown

@viper9503 viper9503 commented Apr 13, 2026

Fix count in WOW64 networking messages conversion

Problem

Multiplayer is broken for 32-bit games running on 64-bit systems (the WOW64 path). Stardew Valley is the most commonly reported case, players can't join or host multiplayer sessions on Proton 10.0, but it works fine on 9.0-4.

The WOW64 overloads of receive_messages_utow and send_messages_wtou in lsteamclient/unix_steam_networking_manual.cpp use while(count--) to copy ptr32<> pointer arrays into native 64-bit arrays. Since count is uint32_t, the post-decrement wraps it to UINT32_MAX after the loop. The subsequent call to the actual message processing function receives this corrupted count, so networking messages are never delivered.

Affected games

Any 32-bit game that uses Steam networking APIs for multiplayer, including:

  • Stardew Valley (AppID 322170)
  • Other 32-bit titles using ISteamNetworkingSockets or ISteamNetworkingMessages

64-bit games are unaffected as they don't use the ptr32<> code path.

Fix

Replace while(count--) with for(i = 0; i < count; ++i) in all three WOW64 thunk functions so count is preserved for the subsequent call.

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