diff --git a/c-api/data/discord_user.h b/c-api/data/discord_user.h index 898ec8a..07c5591 100644 --- a/c-api/data/discord_user.h +++ b/c-api/data/discord_user.h @@ -16,15 +16,15 @@ struct ClrDiscordUser { auto usernameStr = discordManager->GetUsername(); username = new char[usernameStr.length() + 1]; - strcpy(username, usernameStr.c_str()); + strcpy_s(username, usernameStr.length() + 1, usernameStr.c_str()); auto discriminatorStr = discordManager->GetDiscriminator(); discriminator = new char[discriminatorStr.length() + 1]; - strcpy(discriminator, discriminatorStr.c_str()); + strcpy_s(discriminator, discriminatorStr.length() + 1, discriminatorStr.c_str()); auto avatarStr = discordManager->GetAvatar(); avatar = new char[avatarStr.length() + 1]; - strcpy(avatar, avatarStr.c_str()); + strcpy_s(avatar, avatarStr.length() + 1,avatarStr.c_str()); } ~ClrDiscordUser() { diff --git a/c-api/data/vehicle_model_info.h b/c-api/data/vehicle_model_info.h index ec0f4ca..3aceafe 100644 --- a/c-api/data/vehicle_model_info.h +++ b/c-api/data/vehicle_model_info.h @@ -54,7 +54,7 @@ struct ClrVehicleModelInfo } title = new char[info.title.length() + 1]; - strcpy(title, info.title.c_str()); + strcpy_s(title, info.title.length() + 1, info.title.c_str()); const auto vehModelBones = info.bones; boneSize = vehModelBones.size();