Skip to content

Commit

Permalink
Fix CRT_DEPRECATION warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kin4stat committed Nov 22, 2024
1 parent afa426e commit f36fa12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions c-api/data/discord_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion c-api/data/vehicle_model_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f36fa12

Please sign in to comment.