Fix multiple small issues :)

This commit is contained in:
Lion Kortlepel
2020-11-11 11:24:36 +01:00
parent 8f05cdcc61
commit 308500c01f
6 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ void TCPServerMain(){
#else // unix
// wondering why we need slightly different implementations of this?
// ask ms.
SOCKET client, Listener = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
SOCKET client = -1, Listener = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
sockaddr_in addr{};
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = AF_INET;
-1
View File
@@ -184,7 +184,6 @@ void GlobalParser(Client*c, const std::string& Pack){
SendToAll(c,Packet,false,false);
return;
}
switch (Code) {
case 'P': // initial connection
#ifdef DEBUG
+1 -1
View File
@@ -70,7 +70,7 @@ void TCPRcv(Client*c){
return;
}
BytesRcv += Temp;
}while(BytesRcv < sizeof(Header));
}while(size_t(BytesRcv) < sizeof(Header));
memcpy(&Header,&Data[0],sizeof(Header));
#ifdef DEBUG