summaryrefslogtreecommitdiff
path: root/src/server/binding.c
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-04-12 19:22:46 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-04-12 19:22:46 -0400
commit9d77fe0022cf6730ee8caee353f42266cb18d06a (patch)
tree701c120dd81711a414b25c3b71fdd004a131b6c8 /src/server/binding.c
parentdumb bug (diff)
downloadwrapper-9d77fe0022cf6730ee8caee353f42266cb18d06a.tar.gz
wrapper-9d77fe0022cf6730ee8caee353f42266cb18d06a.tar.bz2
wrapper-9d77fe0022cf6730ee8caee353f42266cb18d06a.zip
dumb endianess bug
Diffstat (limited to 'src/server/binding.c')
-rw-r--r--src/server/binding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/binding.c b/src/server/binding.c
index c643ee5..b05dfbb 100644
--- a/src/server/binding.c
+++ b/src/server/binding.c
@@ -158,10 +158,10 @@ static bool write_udp(Connection* connection, uint8_t* buf, uint16_t len) {
}
static bool write_tcp(Connection* connection, uint8_t* buf, uint16_t len) {
- len = htons(len);
+ uint16_t net_len = htons(len);
if (write_tcp_stream(
&connection->sock.tcp,
- &len,
+ &net_len,
sizeof(uint16_t)
) < 0) {
return false;