Browse Source

fixed invalid server address memory

Kajetan Johannes Hammerle 3 năm trước cách đây
mục cha
commit
d3ab446131
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      network/Client.cpp

+ 1 - 0
network/Client.cpp

@@ -28,6 +28,7 @@ Error Client::connect(const char* server, Port port, int timeout) {
     assert(client != nullptr);
     assert(connection == nullptr);
     ENetAddress address;
+    memset(&address, 0, sizeof(ENetAddress));
     ENetEvent event;
     enet_address_set_host(&address, server);
     address.port = port;