From a85c616cb83000f9ac4de1f00d153b0755869599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 4 Mar 2022 19:43:03 +0800 Subject: [PATCH] fix accept --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 4c72f1c..44e103d 100644 --- a/server.c +++ b/server.c @@ -545,7 +545,7 @@ static int accept_client(int server_sock, int is_unix_sock) { continue; } if(is_unix_sock) { - uclient_name.sun_path[sizeof(uclient_name.sun_path)-1] = 0; + ((char*)&uclient_name)[client_name_len] = 0; printf("Accept client %s\n", uclient_name.sun_path); } else {