Skip to content

Commit

Permalink
Database: Use null for accounts (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC authored Nov 5, 2023
1 parent cea0b98 commit 0f9e951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dGame/dUtilities/CheatDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void ReportCheat(User* user, const SystemAddress& sysAddr, const char* messageIf
std::unique_ptr<sql::PreparedStatement> stmt(Database::CreatePreppedStmt(
"INSERT INTO player_cheat_detections (account_id, name, violation_msg, violation_system_address) VALUES (?, ?, ?, ?)")
);
stmt->setInt(1, user ? user->GetAccountID() : 0);
user ? stmt->setInt(1, user->GetAccountID()) : stmt->setNull(1, sql::DataType::INTEGER);
stmt->setString(2, user ? user->GetUsername().c_str() : "User is null.");

constexpr int32_t bufSize = 4096;
Expand Down

0 comments on commit 0f9e951

Please sign in to comment.