mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-10-14 09:55:33 +08:00
fixed get_sock_error() format on windows
This commit is contained in:
committed by
wangyu-
parent
0137dba1fd
commit
238e85a5e4
@@ -404,7 +404,11 @@ char *get_sock_error()
|
||||
(LPWSTR)&s, 0, NULL);
|
||||
sprintf(buf, "%d:%S", e,s);
|
||||
int len=strlen(buf);
|
||||
if(len>0&&buf[len-1]=='\n') buf[len-1]=0;
|
||||
while(len>0 && (buf[len-1]=='\r'||buf[len-1]=='\n' ))
|
||||
{
|
||||
len--;
|
||||
buf[len]=0;
|
||||
}
|
||||
LocalFree(s);
|
||||
return buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user