diff --git a/source/yojimbo_base_client.cpp b/source/yojimbo_base_client.cpp index 12754a6d..f2cb036f 100644 --- a/source/yojimbo_base_client.cpp +++ b/source/yojimbo_base_client.cpp @@ -142,7 +142,11 @@ namespace yojimbo } reliable_config_t reliable_config; reliable_default_config( &reliable_config ); - strcpy( reliable_config.name, "client endpoint" ); + #if defined(_MSC_VER) + strcpy_s( reliable_config.name, sizeof( reliable_config.name ), "client endpoint" ); + #else + strcpy( reliable_config.name, "client endpoint" ); + #endif reliable_config.context = (void*) this; reliable_config.max_packet_size = m_config.maxPacketSize; reliable_config.fragment_above = m_config.fragmentPacketsAbove; diff --git a/source/yojimbo_base_server.cpp b/source/yojimbo_base_server.cpp index b999111a..6e7d2c8a 100644 --- a/source/yojimbo_base_server.cpp +++ b/source/yojimbo_base_server.cpp @@ -73,7 +73,11 @@ namespace yojimbo reliable_config_t reliable_config; reliable_default_config( &reliable_config ); - strcpy( reliable_config.name, "server endpoint" ); + #if defined(_MSC_VER) + strcpy_s( reliable_config.name, sizeof( reliable_config.name ), "server endpoint" ); + #else + strcpy( reliable_config.name, "server endpoint" ); + #endif reliable_config.context = (void*) this; reliable_config.index = i; reliable_config.max_packet_size = m_config.maxPacketSize;