diff --git a/source/client/net.cpp b/source/client/net.cpp index 956c688..1de5847 100644 --- a/source/client/net.cpp +++ b/source/client/net.cpp @@ -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; }