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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,7 +223,7 @@ public:
std::string str = name.data(); // Making subtractions to the last character does not with in string_view
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)
{
handler->SendErrorMessage(LANG_COMMAND_GOCREATNOTFOUND);