[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:
Ambal 2009-10-26 01:05:08 +02:00
parent a2ed351365
commit b0ea8848a5
7 changed files with 29 additions and 19 deletions

View file

@ -768,7 +768,7 @@ void ChatHandler::SendSysMessage(const char *str)
WorldPacket data;
// need copy to prevent corruption by strtok call in LineFromMessage original string
char* buf = strdup(str);
char* buf = mangos_strdup(str);
char* pos = buf;
while(char* line = LineFromMessage(pos))
@ -777,7 +777,7 @@ void ChatHandler::SendSysMessage(const char *str)
m_session->SendPacket(&data);
}
free(buf);
delete [] buf;
}
void ChatHandler::SendGlobalSysMessage(const char *str)
@ -786,7 +786,7 @@ void ChatHandler::SendGlobalSysMessage(const char *str)
WorldPacket data;
// need copy to prevent corruption by strtok call in LineFromMessage original string
char* buf = strdup(str);
char* buf = mangos_strdup(str);
char* pos = buf;
while(char* line = LineFromMessage(pos))
@ -795,7 +795,7 @@ void ChatHandler::SendGlobalSysMessage(const char *str)
sWorld.SendGlobalMessage(&data);
}
free(buf);
delete [] buf;
}
void ChatHandler::SendSysMessage(int32 entry)