fixed bug where packets could be corrupted in network transfer
This commit is contained in:
parent
dbb06a6a11
commit
f844f7fc42
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ SOCKET_STATE receive_buf(TCPsocket sock, std::vector<char>& buf)
|
|||
current_transfer_stats.second = len;
|
||||
|
||||
while(beg != end) {
|
||||
const int len = SDLNet_TCP_Recv(sock,&buf[0],end - beg);
|
||||
const int len = SDLNet_TCP_Recv(sock,beg,end - beg);
|
||||
if(len <= 0) {
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue