about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 232cc31bc..2484edfe3 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -432,7 +432,7 @@ bin_ztcp(char *nam, char **args, Options ops, UNUSED(int func))
 	if (bind(sess->fd, (struct sockaddr *)&sess->sock.in, sizeof(struct sockaddr_in)))
 	{
 	    char buf[DIGBUFSIZE];
-	    convbase(buf, (zlong)lport, 10);
+	    convbase(buf, (zlong)ntohs(lport), 10);
 	    zwarnnam(nam, "could not bind to port %s: %e", buf, errno);
 	    tcp_close(sess);
 	    return 1;