mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-04 22:07:52 +00:00
fix(Scripts/Commands): quote go creature name query safely (#26520)
This commit is contained in:
@@ -223,7 +223,7 @@ public:
|
|||||||
std::string str = name.data(); // Making subtractions to the last character does not with in string_view
|
std::string str = name.data(); // Making subtractions to the last character does not with in string_view
|
||||||
WorldDatabase.EscapeString(str);
|
WorldDatabase.EscapeString(str);
|
||||||
|
|
||||||
QueryResult result = WorldDatabase.Query("SELECT entry FROM creature_template WHERE name = \"{}\" LIMIT 1", str);
|
QueryResult result = WorldDatabase.Query("SELECT entry FROM creature_template WHERE name = '{}' LIMIT 1", str);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
handler->SendErrorMessage(LANG_COMMAND_GOCREATNOTFOUND);
|
handler->SendErrorMessage(LANG_COMMAND_GOCREATNOTFOUND);
|
||||||
|
|||||||
Reference in New Issue
Block a user