From 0862feeba8d330436537d1550128400bb982a37a Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Thu, 10 Jul 2014 15:19:10 -0700 Subject: [PATCH] GetGroupLeaderForLogin converted to StringFormat --- common/database.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index 9370b444e..4deaff5e2 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -1698,12 +1698,11 @@ uint32 Database::GetGroupID(const char* name){ } char* Database::GetGroupLeaderForLogin(const char* name,char* leaderbuf){ - char *query = nullptr; - + PlayerProfile_Struct pp; - auto results = QueryDatabase(query, MakeAnyLenString(&query, "SELECT profile from character_ where name='%s'", name)); - safe_delete_array(query); + std::string query = StringFormat("SELECT profile from character_ where name='%s'", name); + auto results = QueryDatabase(query); if (!results.Success()) {