@@ -1169,7 +1169,7 @@ void NAT::processGlobalMessage(Int slotNum, const char *options) {
11691169 ++ptr;
11701170 }
11711171 DEBUG_LOG ((" NAT::processGlobalMessage - got message from slot %d, message is \" %s\" " , slotNum, ptr));
1172- if (! strncmp (ptr, " PROBED" , strlen (" PROBED" ))) {
1172+ if (strncmp (ptr, " PROBED" , strlen (" PROBED" )) == 0 ) {
11731173 // format: PROBED<node number>
11741174 // a probe has been sent at us, if we are waiting because of a netgear or something, we
11751175 // should start sending our own probes.
@@ -1180,7 +1180,7 @@ void NAT::processGlobalMessage(Int slotNum, const char *options) {
11801180 } else {
11811181 DEBUG_LOG ((" NAT::processGlobalMessage - probed by node %d, not our target" , node));
11821182 }
1183- } else if (! strncmp (ptr, " CONNDONE" , strlen (" CONNDONE" ))) {
1183+ } else if (strncmp (ptr, " CONNDONE" , strlen (" CONNDONE" )) == 0 ) {
11841184 // format: CONNDONE<node number>
11851185 // we should get the node number of the player who's connection is done from the options
11861186 // and mark that down as part of the connectionStates.
@@ -1205,7 +1205,7 @@ void NAT::processGlobalMessage(Int slotNum, const char *options) {
12051205 } else {
12061206 DEBUG_LOG ((" NAT::processGlobalMessage - got a connection done message that isn't from this round. node: %d sending node: %d" , node, sendingNode));
12071207 }
1208- } else if (! strncmp (ptr, " CONNFAILED" , strlen (" CONNFAILED" ))) {
1208+ } else if (strncmp (ptr, " CONNFAILED" , strlen (" CONNFAILED" )) == 0 ) {
12091209 // format: CONNFAILED<node number>
12101210 // we should get the node number of the player who's connection failed from the options
12111211 // and mark that down as part of the connectionStates.
@@ -1214,7 +1214,7 @@ void NAT::processGlobalMessage(Int slotNum, const char *options) {
12141214 DEBUG_LOG ((" NAT::processGlobalMessage - node %d's connection failed, setting connection state to failed" , node));
12151215 setConnectionState (node, NATCONNECTIONSTATE_FAILED);
12161216 }
1217- } else if (! strncmp (ptr, " PORT" , strlen (" PORT" ))) {
1217+ } else if (strncmp (ptr, " PORT" , strlen (" PORT" )) == 0 ) {
12181218 // format: PORT<node number> <port number> <internal IP>
12191219 // we should get the node number and the mangled port number of the client we
12201220 // are supposed to be communicating with and start probing them. No, that was not
0 commit comments