mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +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:
@@ -59,9 +59,11 @@ float CDBehaviorParameterTable::GetEntry(const uint32_t behaviorID, const std::s
|
||||
}
|
||||
|
||||
#ifndef CDCLIENT_CACHE_ALL
|
||||
auto tableData = CDClientDatabase::ExecuteQueryWithArgs(
|
||||
"SELECT parameterID, value FROM BehaviorParameter WHERE behaviorID = %u;",
|
||||
behaviorID);
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT parameterID, value FROM BehaviorParameter WHERE behaviorID = ?;");
|
||||
query.bind(1, (int) behaviorID);
|
||||
|
||||
auto tableData = query.execQuery();
|
||||
|
||||
m_Entries.insert_or_assign(behaviorID, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user