mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8736] operator new[] based version of strdup() function to get bonuses from Intel Memory allocator mainly in DB code
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
a2ed351365
commit
b0ea8848a5
7 changed files with 29 additions and 19 deletions
|
|
@ -1769,7 +1769,7 @@ void World::SendGlobalText(const char* text, WorldSession *self)
|
|||
WorldPacket data;
|
||||
|
||||
// need copy to prevent corruption by strtok call in LineFromMessage original string
|
||||
char* buf = strdup(text);
|
||||
char* buf = mangos_strdup(text);
|
||||
char* pos = buf;
|
||||
|
||||
while(char* line = ChatHandler::LineFromMessage(pos))
|
||||
|
|
@ -1778,7 +1778,7 @@ void World::SendGlobalText(const char* text, WorldSession *self)
|
|||
SendGlobalMessage(&data, self);
|
||||
}
|
||||
|
||||
free(buf);
|
||||
delete [] buf;
|
||||
}
|
||||
|
||||
/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue