mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 01:34:07 +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:
@@ -371,10 +371,12 @@ const std::vector<BuffParameter>& BuffComponent::GetBuffParameters(int32_t buffI
|
||||
return pair->second;
|
||||
}
|
||||
|
||||
auto result = CDClientDatabase::ExecuteQueryWithArgs(
|
||||
"SELECT * FROM BuffParameters WHERE BuffID = %d;",
|
||||
buffId);
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT * FROM BuffParameters WHERE BuffID = ?;");
|
||||
query.bind(1, (int) buffId);
|
||||
|
||||
auto result = query.execQuery();
|
||||
|
||||
std::vector<BuffParameter> parameters {};
|
||||
|
||||
while (!result.eof())
|
||||
|
Reference in New Issue
Block a user