Merge branch 'net' of https://github.com/mdiluz/ttrts into net

This commit is contained in:
Marc Di Luzio 2015-01-07 12:40:44 +00:00
commit 7811daa78b
2 changed files with 8 additions and 1 deletions

View file

@ -233,7 +233,7 @@ std::string WaitForGamestateMessage(int sockfd)
int SendOrdersToServer(int sockfd, const std::string &orders)
{
int n = write(sockfd,orders.c_str(),orders.length());
if (0 < n)
if (n < 0)
fatal_perror("ERROR writing to socket");
return n;
}