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:
@@ -386,9 +386,11 @@ void Item::DisassembleModel()
|
||||
|
||||
const auto componentId = table->GetByIDAndType(GetLot(), COMPONENT_TYPE_RENDER);
|
||||
|
||||
auto result = CDClientDatabase::ExecuteQueryWithArgs(
|
||||
"SELECT render_asset FROM RenderComponent WHERE id = %d;",
|
||||
componentId);
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT render_asset FROM RenderComponent WHERE id = ?;");
|
||||
query.bind(1, (int) componentId);
|
||||
|
||||
auto result = query.execQuery();
|
||||
|
||||
if (result.eof())
|
||||
{
|
||||
|
Reference in New Issue
Block a user