Sfoglia il codice sorgente

Fix ENet incorrectly binding to wildcard.

Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966b9ac1abbd2c0386e78922d901ce8ae)
Fabio Alessandrelli 6 anni fa
parent
commit
a24e681e1c
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      modules/enet/networked_multiplayer_enet.cpp

+ 1 - 0
modules/enet/networked_multiplayer_enet.cpp

@@ -80,6 +80,7 @@ Error NetworkedMultiplayerENet::create_server(int p_port, int p_max_clients, int
 	ERR_FAIL_COND_V(p_out_bandwidth < 0, ERR_INVALID_PARAMETER);
 
 	ENetAddress address;
+	memset(&address, 0, sizeof(address));
 
 #ifdef GODOT_ENET
 	if (bind_ip.is_wildcard()) {