mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix (core): macos12 depreciation workflow error / security CWE-120 (#14746)
* fix (core): macos12 depreciation workflow error
Fix workflow error message:
azerothcore-wotlk/src/common/Utilities/Util.cpp:558:9: fatal error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(buffer, "%02X", bytes[i]);
* Update BattlegroundAV.cpp
* more macos12 fixit
* Update spell_generic.cpp
This commit is contained in:
@@ -3900,7 +3900,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
const char* gender = "his";
|
||||
if (m_caster->getGender() > 0)
|
||||
gender = "her";
|
||||
sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName().c_str(), gender, gender, urand(1, 10), urand(1, 10));
|
||||
snprintf(buf, sizeof(buf), "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName().c_str(), gender, gender, urand(1, 10), urand(1, 10));
|
||||
m_caster->TextEmote(buf);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user