Skip to content

Port comparison uses mixed byte order #65

@Belonit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions