Explorar el Código

enet_peer_receive channelID fix

eihrul hace 15 años
padre
commit
94a1e8879f
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      peer.c

+ 2 - 1
peer.c

@@ -218,7 +218,8 @@ enet_peer_receive (ENetPeer * peer, enet_uint8 * channelID)
 
    incomingCommand = (ENetIncomingCommand *) enet_list_remove (enet_list_begin (& peer -> dispatchedCommands));
 
-   * channelID = incomingCommand -> command.header.channelID;
+   if (channelID != NULL)
+     * channelID = incomingCommand -> command.header.channelID;
 
    packet = incomingCommand -> packet;