fix(Scripts/Commands): quote go creature name query safely (#26520)

This commit is contained in:
Yehonal
2026-07-14 23:18:03 +02:00
committed by GitHub
parent 4927c15f7e
commit e7823750f9

View File

@@ -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);