Closed neversaid closed 1 year ago
On newer Windows Systems hton returns numbers with the 16th bit set.
Example: htons(461) => 53505 (32bit Systems) htons(461) => 119041 (64bit Systems / newer Windows Versions)
Checking this in binary: 53505 => 01101000100000001 119041 => 11101000100000001
When removing the 16th bit by bitclear the code works as supposed
On newer Windows Systems hton returns numbers with the 16th bit set.
Example: htons(461) => 53505 (32bit Systems) htons(461) => 119041 (64bit Systems / newer Windows Versions)
Checking this in binary: 53505 => 01101000100000001 119041 => 11101000100000001
When removing the 16th bit by bitclear the code works as supposed