mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Comply with Xiphoseer required changes.
Remove the CDClientDatabase::ExecuteQueryWithArgs() function and replace it with CDClientDatabase::CreatePreppedStmt(). This prevents a developer from accidently using %s, or incorrectly passing std::string, and causing a silent error.
This commit is contained in:
@@ -373,8 +373,11 @@ void DestroyableComponent::AddFaction(const int32_t factionID, const bool ignore
|
||||
m_FactionIDs.push_back(factionID);
|
||||
m_DirtyHealth = true;
|
||||
|
||||
auto result = CDClientDatabase::ExecuteQueryWithArgs(
|
||||
"SELECT enemyList FROM Factions WHERE faction = %d;", factionID);
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT enemyList FROM Factions WHERE faction = ?;");
|
||||
query.bind(1, (int) factionID);
|
||||
|
||||
auto result = query.execQuery();
|
||||
|
||||
if (result.eof()) return;
|
||||
|
||||
|
Reference in New Issue
Block a user