Skip to content

Port comparison uses mixed byte order #65

Description

@Belonit

@ZivDero :

if (Port != (u_short)Spawner::Config->ListenPort)

there may be a bug here
CnCNet DLL for Command and Conquer: Yuri's Revenge using Syringe - CnCNet/yrpp-spawner
yrpp-spawner/src/Spawner/Spawner.cpp at b2ad0ca...
i verified this line against ts-patches and it seems to be the same there
here the player's port is passed through htons
then compared to ListenPort which was not passed through htons
thus by logic they will never be equal?
so part hack is effectively forced to false
if i understand it correctly

Activity

  1. linked a pull request that will close this issuefix: port-match logic (closes #65) #66on Apr 21, 2026
  2. added a commit that references this issue on Apr 21, 2026
    ae24f3d
  3. added theissue type on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions