mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Merge pull request #16 from Valorith/copilot/fix-bot-command-error
[Bug Fix] Prevent spelltype bot command aliasing from MSVC ICF on Windows
This commit is contained in:
@@ -2,10 +2,20 @@
|
|||||||
|
|
||||||
void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
||||||
{
|
{
|
||||||
|
// Unique marker to prevent MSVC's Identical COMDAT Folding (/OPT:ICF)
|
||||||
|
// from merging this function with bot_command_spelltype_names, which
|
||||||
|
// would cause the alias detection in bot_command_add() to fail.
|
||||||
|
static volatile int spelltype_ids_marker = 0;
|
||||||
|
(void)spelltype_ids_marker;
|
||||||
SendSpellTypeWindow(c, sep);
|
SendSpellTypeWindow(c, sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bot_command_spelltype_names(Client* c, const Seperator* sep)
|
void bot_command_spelltype_names(Client* c, const Seperator* sep)
|
||||||
{
|
{
|
||||||
|
// Unique marker to prevent MSVC's Identical COMDAT Folding (/OPT:ICF)
|
||||||
|
// from merging this function with bot_command_spelltype_ids, which
|
||||||
|
// would cause the alias detection in bot_command_add() to fail.
|
||||||
|
static volatile int spelltype_names_marker = 0;
|
||||||
|
(void)spelltype_names_marker;
|
||||||
SendSpellTypeWindow(c, sep);
|
SendSpellTypeWindow(c, sep);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user